mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-02 10:17:32 -06:00
sandbox instead of exec
This commit is contained in:
@@ -110,7 +110,7 @@ export class BaseCompiler {
|
||||
this.externalparser = null;
|
||||
if (this.compiler.externalparser && this.compiler.externalparser.id) {
|
||||
const externalparserclass = getExternalParserByKey(this.compiler.externalparser.id);
|
||||
this.externalparser = new externalparserclass(this.compiler, this.env, this.exec);
|
||||
this.externalparser = new externalparserclass(this.compiler, this.env, exec.sandbox);
|
||||
}
|
||||
|
||||
if (!this.compiler.instructionSet) {
|
||||
|
||||
@@ -67,17 +67,13 @@ export class ExternalParserBase implements IExternalParser {
|
||||
public async objdumpAndParseAssembly(buildfolder: string, objdumpArgs: string[],
|
||||
filters: IParseFilters): Promise<IParsedAsmResult> {
|
||||
const scriptFilepath = await this.writeStarterScriptObjdump(buildfolder, filters);
|
||||
const execOptions = {
|
||||
customCwd: buildfolder,
|
||||
};
|
||||
const execOptions = {};
|
||||
const execResult = await this.execFunc(scriptFilepath, objdumpArgs, execOptions);
|
||||
return this.parseAsmExecResult(execResult);
|
||||
}
|
||||
|
||||
public async parseAssembly(filepath: string, filters: IParseFilters): Promise<IParsedAsmResult> {
|
||||
const execOptions = {
|
||||
customCwd: path.dirname(filepath),
|
||||
};
|
||||
const execOptions = {};
|
||||
|
||||
const parserArgs = this.getParserArguments(filters, false);
|
||||
parserArgs.push(filepath);
|
||||
|
||||
Reference in New Issue
Block a user