Change the way we pre-load symbol for syscall by calling it
authorTomasz Swierczek <t.swierczek@samsung.com>
Wed, 5 Feb 2025 07:05:06 +0000 (08:05 +0100)
committerTomasz Swierczek <t.swierczek@samsung.com>
Wed, 5 Feb 2025 07:17:57 +0000 (08:17 +0100)
Apparently using -1 as invalid argument can fail with SIGILL
on some configurations (happened on VD side).

Change-Id: I26d1d0411c637a67888a8d1e73892171004d05a3

src/client/client-security-manager.cpp

index d65d6626f385bcc634abd87edfb8de5dc025f473..c5325fa04c8c7adb78160f9b66a5b83413690094 100644 (file)
@@ -873,7 +873,7 @@ static inline int security_manager_sync_threads_internal(const std::string &app_
     // not calling open/read/write/close/std::string anywyere as these are already used before,
     // including openning connection to the daemon that uses sockets.
     // <begin of calling functions to load symbols>
-    (void)syscall(-1);
+    (void)Syscall::gettid(); // this will force to load syscall()
     usleep(SLEEP_CONST);
     char buffer [10];
     int a = 1;