diff options
author | Patrick Quist <partouf@gmail.com> | 2023-11-07 23:59:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-07 23:59:40 +0100 |
commit | 455d92916a9c22a3e2ae2f094e00b60d520efd44 (patch) | |
tree | 11a543d070019c973a91084b88a663dd69416602 /lib/compilers | |
parent | e4f2bf6b42e8c74bd2f47c8246239c1cc7be4853 (diff) | |
download | compiler-explorer-455d92916a9c22a3e2ae2f094e00b60d520efd44.tar.gz compiler-explorer-455d92916a9c22a3e2ae2f094e00b60d520efd44.zip |
Execution with heaptrack (#5644)gh-9459
Diffstat (limited to 'lib/compilers')
-rw-r--r-- | lib/compilers/dotnet.ts | 17 | ||||
-rw-r--r-- | lib/compilers/fake-for-test.ts | 2 |
2 files changed, 8 insertions, 11 deletions
diff --git a/lib/compilers/dotnet.ts b/lib/compilers/dotnet.ts index 5a1f4c12f..ad5709447 100644 --- a/lib/compilers/dotnet.ts +++ b/lib/compilers/dotnet.ts @@ -29,14 +29,12 @@ import _ from 'underscore'; import type {CompilationResult, ExecutionOptions} from '../../types/compilation/compilation.interfaces.js'; import type {PreliminaryCompilerInfo} from '../../types/compiler.interfaces.js'; -import type { - BasicExecutionResult, - ExecutableExecutionOptions, - UnprocessedExecResult, +import { + type BasicExecutionResult, + type ExecutableExecutionOptions, } from '../../types/execution/execution.interfaces.js'; import type {ParseFiltersAndOutputOptions} from '../../types/features/filters.interfaces.js'; import {BaseCompiler} from '../base-compiler.js'; -import * as exec from '../exec.js'; import {DotNetAsmParser} from '../parsers/asm-parser-dotnet.js'; import * as utils from '../utils.js'; @@ -437,9 +435,9 @@ class DotNetCompiler extends BaseCompiler { override async execBinary( executable: string, - maxSize: number | undefined, + maxSize: number, executeParameters: ExecutableExecutionOptions, - homeDir: string | undefined, + homeDir: string, ): Promise<BasicExecutionResult> { const programDir = path.dirname(executable); const programOutputPath = path.join(programDir, 'bin', this.buildConfig, this.targetFramework); @@ -457,9 +455,8 @@ class DotNetCompiler extends BaseCompiler { execOptions.input = executeParameters.stdin; const execArgs = ['-p', 'System.Runtime.TieredCompilation=false', programDllPath, ...executeParameters.args]; try { - const execResult: UnprocessedExecResult = await exec.sandbox(this.corerunPath, execArgs, execOptions); - return this.processExecutionResult(execResult); - } catch (err: UnprocessedExecResult | any) { + return this.execBinaryMaybeWrapped(this.corerunPath, execArgs, execOptions, executeParameters, homeDir); + } catch (err: any) { if (err.code && err.stderr) { return this.processExecutionResult(err); } else { diff --git a/lib/compilers/fake-for-test.ts b/lib/compilers/fake-for-test.ts index 60616207c..f62d534fb 100644 --- a/lib/compilers/fake-for-test.ts +++ b/lib/compilers/fake-for-test.ts @@ -67,7 +67,7 @@ export class FakeCompiler implements ICompiler { return null; } - compile(source, options, backendOptions, filters, bypassCache, tools, executionParameters, libraries, files) { + compile(source, options, backendOptions, filters, bypassCache, tools, executeParameters, libraries, files) { const inputBody = { input: { source: source, |