sandbox instead of exec

This commit is contained in:
partouf
2022-01-21 11:31:27 +00:00
parent 077943879d
commit a408ffca46
2 changed files with 3 additions and 7 deletions
+1 -1
View File
@@ -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) {
+2 -6
View File
@@ -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);