Skip to content

Commit 3ca3028

Browse files
committed
Remove debug printfs from WASI host and CLR initialization
Co-authored-by: Copilot <[email protected]>
1 parent 6a0644a commit 3ca3028

3 files changed

Lines changed: 0 additions & 26 deletions

File tree

‎src/coreclr/dlls/mscoree/exports.cpp‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,7 @@ int coreclr_initialize(
285285

286286
ReleaseHolder<ICLRRuntimeHost4> host;
287287

288-
fprintf(stderr, "CLR: CreateObject\n");
289288
hr = CorHost2::CreateObject(IID_ICLRRuntimeHost4, (void**)&host);
290-
fprintf(stderr, "CLR: CreateObject hr=0x%08x\n", hr);
291289
IfFailRet(hr);
292290

293291
if (bundleProbe != nullptr)
@@ -311,9 +309,7 @@ int coreclr_initialize(
311309
hr = host->SetStartupFlags(startupFlags);
312310
IfFailRet(hr);
313311

314-
fprintf(stderr, "CLR: Start\n");
315312
hr = host->Start();
316-
fprintf(stderr, "CLR: Start hr=0x%08x\n", hr);
317313
IfFailRet(hr);
318314

319315
ConstWStringHolder appDomainFriendlyNameW = StringToUnicode(appDomainFriendlyName);

‎src/coreclr/hosts/corerun/corerun-wasi.cpp‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ int main(int argc, char* argv[])
108108
clr_path = ".";
109109
}
110110

111-
fprintf(stderr, "corerun-wasi: clr_path=%s assembly=%s\n", clr_path, assembly);
112-
113111
// Build TPA list (large buffer for full framework deployment)
114112
static char tpa_list[262144];
115113
build_tpa_list(clr_path, tpa_list, sizeof(tpa_list));
@@ -145,7 +143,6 @@ int main(int argc, char* argv[])
145143
void* host_handle = NULL;
146144
unsigned int domain_id = 0;
147145

148-
fprintf(stderr, "corerun-wasi: calling coreclr_initialize...\n");
149146
int hr = coreclr_initialize(
150147
assembly,
151148
"wasi_appdomain",
@@ -161,8 +158,6 @@ int main(int argc, char* argv[])
161158
return 1;
162159
}
163160

164-
fprintf(stderr, "corerun-wasi: executing assembly...\n");
165-
166161
unsigned int exit_code = 0;
167162
hr = coreclr_execute_assembly(
168163
host_handle,
@@ -178,8 +173,6 @@ int main(int argc, char* argv[])
178173
return 1;
179174
}
180175

181-
fprintf(stderr, "corerun-wasi: exit code %u\n", exit_code);
182-
183176
int latch = 0;
184177
coreclr_shutdown_2(host_handle, domain_id, &latch);
185178

‎src/native/minipal/mutex.c‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,6 @@ bool minipal_mutex_init(minipal_mutex* mtx)
1111
#ifdef HOST_WINDOWS
1212
InitializeCriticalSection(&mtx->_impl);
1313
return true;
14-
#else
15-
#ifdef TARGET_WASI
16-
// WASI: use recursive mutex to match other platforms.
17-
// Even though WASI is single-threaded, the runtime may re-enter locks
18-
// (e.g., handle table lock during exception handling).
19-
pthread_mutexattr_t mutexAttributes;
20-
int st = pthread_mutexattr_init(&mutexAttributes);
21-
if (st != 0)
22-
return false;
23-
st = pthread_mutexattr_settype(&mutexAttributes, PTHREAD_MUTEX_RECURSIVE);
24-
if (st == 0)
25-
st = pthread_mutex_init(&mtx->_impl, &mutexAttributes);
26-
pthread_mutexattr_destroy(&mutexAttributes);
27-
return (st == 0);
2814
#else
2915
pthread_mutexattr_t mutexAttributes;
3016
int st = pthread_mutexattr_init(&mutexAttributes);
@@ -38,7 +24,6 @@ bool minipal_mutex_init(minipal_mutex* mtx)
3824
pthread_mutexattr_destroy(&mutexAttributes);
3925

4026
return (st == 0);
41-
#endif // TARGET_WASI
4227
#endif // HOST_WINDOWS
4328
}
4429

0 commit comments

Comments
 (0)