Quellcode durchsuchen

Merge pull request #1261 from yurybikuzin/crashey

Crashey
Caleb James DeLisle vor 10 Monaten
Ursprung
Commit
fbc8bccd98
3 geänderte Dateien mit 9 neuen und 2 gelöschten Zeilen
  1. 1 1
      node_build/make.js
  2. 6 0
      util/Seccomp_linux.c
  3. 2 1
      util/test/Seccomp_test.c

+ 1 - 1
node_build/make.js

@@ -28,7 +28,7 @@ var LDFLAGS = process.env['LDFLAGS'];
 // case clang doesn't reliably support march except on x86/amd64.
 var NO_MARCH_FLAG = ['arm', 'ppc', 'ppc64', 'arm64'];
 
-if (process.version.replace('v','').split('.').map(Number)[0] >= 19) {
+if (process.version.replace('v','').split('.').map(Number)[0] >= 18) {
     // OK
 } else if ('OLD_NODE_VERSION_I_EXPECT_ERRORS' in process.env) {
     console.log('OLD_NODE_VERSION_I_EXPECT_ERRORS is set, ignoring old version');

+ 6 - 0
util/Seccomp_linux.c

@@ -374,6 +374,12 @@ static Er_DEFUN(struct sock_fprog* mkFilter(struct Allocator* alloc))
         IFEQ(__NR_fcntl64, success),
         #endif
 
+        // 2024-01-09 by Caleb's advice
+        // it is used by Seccomp_test
+        #ifdef __NR_sigaltstack
+        IFEQ(__NR_sigaltstack, success),
+        #endif
+
         RET(SECCOMP_RET_TRAP),
 
         LABEL(ioctl_setip),

+ 2 - 1
util/test/Seccomp_test.c

@@ -115,7 +115,8 @@ int main(int argc, char** argv)
     }
     if (argc > 3 && !CString_strcmp("Seccomp_test", argv[1]) && !CString_strcmp("child", argv[2])) {
         child(argv[3], alloc, logger);
-        Allocator_free(alloc);
+        // Allocator_free(alloc); 
+        // TODO: Freeing the allocator causes a Identity_check() assertion crash in Pipe.c, replace after async allocator free is abolished.
         return 0;
     }