syscall_intercept icon indicating copy to clipboard operation
syscall_intercept copied to clipboard

Workaround SYS_clone3 in Ubuntu 22.04

Open StorWav opened this issue 3 years ago • 1 comments

The GLIBC 2.35 in Ubuntu 22.04 uses SYS_clone3 to create threads, that seems to cause segfault in hook. I use the following workaround to force a fall back to SYS_clone.

if (syscall_number == SYS_clone3)
{
    *result = -ENOSYS;
    return 0;
}

But I guess this may not work if actual call is clone3.

StorWav avatar May 21 '22 20:05 StorWav

Changing line 693 in intercept.c to:

if ( (desc.nr == SYS_clone || desc.nr == SYS_clone3) && desc.args[1] != 0)

Enables clone3 usage, no need to disable the syscall

mavy avatar May 25 '22 11:05 mavy