Skip to content

Commit 18a1cc7

Browse files
committed
Update test10 (it was a bit flaky), update libstdc++ binary, and added fake __libc_single_threadedhandling
1 parent 370286e commit 18a1cc7

File tree

6 files changed

+6
-0
lines changed

6 files changed

+6
-0
lines changed

src/wrapped/wrappedlibc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2726,6 +2726,9 @@ EXPORT char* my___progname_full = NULL;
27262726
EXPORT char* my_program_invocation_name = NULL;
27272727
EXPORT char* my_program_invocation_short_name = NULL;
27282728

2729+
// ignoring this for now
2730+
EXPORT char my___libc_single_threaded = 0;
2731+
27292732
#define PRE_INIT\
27302733
if(box64_tcmalloc_minimal) \
27312734
lib->priv.w.lib = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); \

src/wrapped/wrappedlibc_private.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2301,4 +2301,6 @@ GOM(__deregister_frame_info, pFp)
23012301
DATAM(program_invocation_name, sizeof(void*))
23022302
DATAM(program_invocation_short_name, sizeof(void*))
23032303

2304+
DATAM(__libc_single_threaded, 1)
2305+
23042306
GO(iconvctl, iFlip)

tests/test10

120 KB
Binary file not shown.

tests/test10.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ std::stringstream stream;
1111
void append_number(int x) {
1212
while (lock_stream[x].load()) {}
1313
stream << "thread #" << x << '\n';
14+
stream.flush();
1415
if (x != 9) lock_stream[x + 1].store(false);
1516
}
1617

x64lib/libgcc_s.so.1

24.1 KB
Binary file not shown.

x64lib/libstdc++.so.6

618 KB
Binary file not shown.

0 commit comments

Comments
 (0)