{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":4550110,"defaultBranch":"master","name":"nixpkgs","ownerLogin":"aszlig","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2012-06-04T17:31:30.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/192147?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1694423188.0","currentOid":""},"activityList":{"items":[{"before":"0d0f82e723f6cb4f427bb7d4aca75ed7cebaa89d","after":"7566b3ea70de7f7ddd0424b9bf1932e78eba073f","ref":"refs/heads/nixos-test-videos","pushedAt":"2023-09-11T19:25:57.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"qemu_test: Move video encoder into own derivation\n\nIf we only want to run tests without actually encoding the videos, it\ndoesn't really make sense to pull in the FFmpeg dependency.\n\nWhen debugging tests we can still either use the encoder manually or\nsimply append the .videos attribute in order to get the encoded videos\n(which then of course will pull in the FFmpeg dependency).\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"qemu_test: Move video encoder into own derivation"}},{"before":null,"after":"532fbda40ac2740a4e357c9f18394497811697b6","ref":"refs/heads/nixos-test-videos-rebase-wip","pushedAt":"2023-09-11T09:06:28.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"WIP/FIXME\n\nThese two things are hacks that I used when rebasing the branch to get\nshit working.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"WIP/FIXME"}},{"before":"8e6c0c14a47046fb9424aaf9371ec743bcc0f9c2","after":null,"ref":"refs/heads/libredirect-null-paths","pushedAt":"2023-08-18T23:00:31.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"}},{"before":"b0cf11c457ce61c309dcb56742c6c6536c06a840","after":"8e6c0c14a47046fb9424aaf9371ec743bcc0f9c2","ref":"refs/heads/libredirect-null-paths","pushedAt":"2023-08-18T22:59:41.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"libredirect: Fix segfault handling null paths\n\nWhile using libredirect in conjunction with geckodriver, I stumbled on\nodd segfaults that happened when running the wrapped statx() call from\nlibredirect:\n\n 0x00007ffff7ddd541 in __strncmp_avx2 () from .../lib/libc.so.6\n 0x00007ffff7f6fe57 in statx () from .../lib/libredirect.so\n 0x00005555558d35bd in std::sys::unix::fs::try_statx::h2045d39b0c66d4e8 ()\n 0x00005555558d2230 in std::sys::unix::fs::stat::ha063998dfb361520 ()\n 0x0000555555714019 in mozversion::firefox_version::hdc3b57eb04947426 ()\n 0x00005555556a603c in geckodriver::capabilities::FirefoxCapabilities::version::h58e289917bd3c721 ()\n 0x00005555556a77f5 in ::validate_custom::h62d23cf9fd63b719 ()\n 0x000055555562a7c8 in webdriver::capabilities::SpecNewSessionParameters::validate::h60da250d33f0989f ()\n 0x00005555556d7a13 in as core::iter::traits::iterator::Iterator>::try_fold::h9427a360a3d0bf8f ()\n 0x0000555555669d85 in as alloc::vec::spec_from_iter::SpecFromIter>::from_iter::hd274d536ea29bb33 ()\n 0x00005555555c05ef in core::iter::adapters::try_process::hdf96a01ec1f9b8bd ()\n 0x000055555561768d in ::match_browser::hfbd8c38f6db17e9f ()\n 0x00005555555ca6ef in >::handle_command::h13b98b9cb87a69d6 ()\n 0x00005555555e859e in webdriver::server::Dispatcher::run::h746a8bf2f0bc24fd ()\n 0x000055555569ff0f in std::sys_common::backtrace::__rust_begin_short_backtrace::h3b920773bd467d2a ()\n 0x00005555555dbc99 in core::ops::function::FnOnce::call_once{{vtable.shim}}::h81ba7228877515f7 ()\n 0x00005555558d31a3 in std::sys::unix::thread::Thread::new::thread_start::h4514580219a899c5 ()\n 0x00007ffff7d0ce24 in start_thread () from .../lib/libc.so.6\n 0x00007ffff7d8e9b0 in clone3 () from .../lib/libc.so.6\n\nThe reason why I found this odd was because it happens in the following\npiece of code (shortened a bit):\n\n 1 static const char * rewrite(const char * path, char * buf)\n 2 {\n 3 if (path == NULL) return path;\n 4 for (int n = 0; n < nrRedirects; ++n) {\n 5 int len = strlen(from[n]);\n 6 if (strncmp(path, from[n], len) != 0) continue;\n 7 if (snprintf(buf, PATH_MAX, \"%s%s\", to[n], path + len) >= PATH_MAX)\n 8 abort();\n 9 return buf;\n 10 }\n 11 return path;\n 12 }\n\nWhen inspecting the assembly, I found that the check for the null\npointer in line 3 was completely missing and the code was directly\nentering the loop and then eventually segfault when running strncmp()\nwith a null pointer as its first argument.\n\nI confirmed that indeed that check was missing by compiling libredirect\nwith \"-O0\" and comparing the generated assembly with the optimized one.\nThe one compiled with \"-O0\" had that check while the optimized one did\nnot and indeed when running geckodriver with the unoptimized version it\nworked fine.\n\nDigging in the Git history, I found 5677ce200831a83a7b3d37f2cfc4ec00c10,\nwhich actually introduced the null pointer check. Going back to that\ncommit however, the check actually was still in the generated assembly.\n\nSo I bisected between that commit and the most recent one and ended up\nwith commit ca8aa5dc877344082864cf75512e59c7a1d0ad8c, which moved\neverything to use GCC 7.\n\nI haven't found out why *exactly* GCC was optimizing the check away, but\nplaying around on Godbolt with various other compilers seems that other\ncompilers such as Clang are doing it as well. Additionally, given that\npassing NULL to stat() is UB, my guess is that compilers tend to assume\nthat such an argument can't be NULL. My assumption is based on the fact\nthat GCC warns with \"argument 1 null where non-null expected\" when\npassing NULL to eg. stat().\n\nTo address this for now, I marked the path argument of the rewrite()\nvolatile and also added a test that should cause a segfault in case this\nwould regress again as it already did.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"libredirect: Fix segfault handling null paths"}},{"before":"6cc020bedd96c16184cf5e0b3c90f8847bb1cd8f","after":null,"ref":"refs/heads/ip2unix-2.2.1","pushedAt":"2023-08-18T22:46:30.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"}},{"before":"02792eebe952e012eee9b341e1a5df0b4ed44276","after":"6cc020bedd96c16184cf5e0b3c90f8847bb1cd8f","ref":"refs/heads/ip2unix-2.2.1","pushedAt":"2023-08-18T22:45:59.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"ip2unix: 2.2.0 -> 2.2.1\n\nUpstream changes:\n\n * Fix missing serialisation for from-unix and from-abstract.\n * Improve wording/grammar in README and manpage.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"ip2unix: 2.2.0 -> 2.2.1"}},{"before":null,"after":"02792eebe952e012eee9b341e1a5df0b4ed44276","ref":"refs/heads/ip2unix-2.2.1","pushedAt":"2023-08-18T19:00:16.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"ip2unix: 2.2.0 -> 2.2.1\n\nUpstream changes:\n\n * Fix missing serialisation for from-unix and from-abstract.\n * Improve wording/grammar in README and manpage.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"ip2unix: 2.2.0 -> 2.2.1"}},{"before":"9fd74d2f9ad8fe26dcaa0a2e0210f6320787390a","after":null,"ref":"refs/heads/ip2unix-2.2.0","pushedAt":"2023-08-17T17:55:53.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"}},{"before":"59de01642b7736bdd189ee4be03f082dbbe6af96","after":"9fd74d2f9ad8fe26dcaa0a2e0210f6320787390a","ref":"refs/heads/ip2unix-2.2.0","pushedAt":"2023-08-17T17:54:44.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"ip2unix: 2.1.4 -> 2.2.0\n\nUpstream changes:\n\n * Unlink socket file before bind if SO_REUSEADDR is used.\n * Add support for Linux abstract sockets.\n * Add support for matching an existing Unix domain socket or abstract\n socket.\n * Add stream/datagram aliases for tcp/udp socket types.\n * Add flag to prevent unlinking of socket files when closing sockets.\n * Fix missing header files for newer GCC versions, thanks to Varun\n Madiath.\n * Fix use-after-free of blackhole working directory path.\n * Fix a few compiler warnings on unnecessary allocation of string\n literals.\n * Add deprecation warnings if rules are specified in YAML format.\n * Rule files (-f) are now just a list of newline-separated rule (-r)\n arguments instead of YAML files.\n * Improve serializer to be more robust in end-of-stream conditions.\n * Bump requirements to require at least GCC version 9.\n * No longer prefer C library path over using RTLD_NEXT.\n\nThe missing include added via postPatch is no longer needed as it has\nbeen fixed upstream.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"ip2unix: 2.1.4 -> 2.2.0"}},{"before":null,"after":"59de01642b7736bdd189ee4be03f082dbbe6af96","ref":"refs/heads/ip2unix-2.2.0","pushedAt":"2023-08-16T15:15:30.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"ip2unix: 2.1.4 -> 2.2.0\n\nUpstream changes:\n\n * Unlink socket file before bind if SO_REUSEADDR is used.\n * Add support for Linux abstract sockets.\n * Add support for matching an existing Unix domain socket or abstract\n socket.\n * Add stream/datagram aliases for tcp/udp socket types.\n * Add flag to prevent unlinking of socket files when closing sockets.\n * Fix missing header files for newer GCC versions, thanks to Varun\n Madiath.\n * Fix use-after-free of blackhole working directory path.\n * Fix a few compiler warnings on unnecessary allocation of string\n literals.\n * Add deprecation warnings if rules are specified in YAML format.\n * Rule files (-f) are now just a list of newline-separated rule (-r)\n arguments instead of YAML files.\n * Improve serializer to be more robust in end-of-stream conditions.\n * Bump requirements to require at least GCC version 9.\n * No longer prefer C library path over using RTLD_NEXT.\n\nThe missing include added via postPatch is no longer needed as it has\nbeen fixed upstream.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"ip2unix: 2.1.4 -> 2.2.0"}},{"before":null,"after":"8c3af9128207e743eb636421eb41c949913b598e","ref":"refs/heads/rebase-to-staging-highlight-pr-as-draft","pushedAt":"2023-07-11T01:23:06.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"CONTRIBUTING: Put emphasis on switch to draft PR\n\nI always wondered why I regularly got pinged by various staging changes\nand now recently got bitten by the same thing in a pull request that I\nrebased against staging.\n\nTo make sure to avoid something like this, I actually did read\nCONTRIBUTING.md but apparently not careful enough so I missed (for some\nreason in plain sight) the part about converting the pull request to\ndraft.\n\nWhile I probably won't make that mistake again in the future, others\nmight miss this point as well and since it's IMHO also the most\nimportant point, I decided to put emphasis on it so it's even more\nunlikely to miss.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"CONTRIBUTING: Put emphasis on switch to draft PR"}},{"before":"8339afc285a2f4c2e69ccbd3c0dec2eb7966b146","after":"b0cf11c457ce61c309dcb56742c6c6536c06a840","ref":"refs/heads/libredirect-null-paths","pushedAt":"2023-07-10T20:16:46.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"libredirect: Fix segfault handling null paths\n\nWhile using libredirect in conjunction with geckodriver, I stumbled on\nodd segfaults that happened when running the wrapped statx() call from\nlibredirect:\n\n 0x00007ffff7ddd541 in __strncmp_avx2 () from .../lib/libc.so.6\n 0x00007ffff7f6fe57 in statx () from .../lib/libredirect.so\n 0x00005555558d35bd in std::sys::unix::fs::try_statx::h2045d39b0c66d4e8 ()\n 0x00005555558d2230 in std::sys::unix::fs::stat::ha063998dfb361520 ()\n 0x0000555555714019 in mozversion::firefox_version::hdc3b57eb04947426 ()\n 0x00005555556a603c in geckodriver::capabilities::FirefoxCapabilities::version::h58e289917bd3c721 ()\n 0x00005555556a77f5 in ::validate_custom::h62d23cf9fd63b719 ()\n 0x000055555562a7c8 in webdriver::capabilities::SpecNewSessionParameters::validate::h60da250d33f0989f ()\n 0x00005555556d7a13 in as core::iter::traits::iterator::Iterator>::try_fold::h9427a360a3d0bf8f ()\n 0x0000555555669d85 in as alloc::vec::spec_from_iter::SpecFromIter>::from_iter::hd274d536ea29bb33 ()\n 0x00005555555c05ef in core::iter::adapters::try_process::hdf96a01ec1f9b8bd ()\n 0x000055555561768d in ::match_browser::hfbd8c38f6db17e9f ()\n 0x00005555555ca6ef in >::handle_command::h13b98b9cb87a69d6 ()\n 0x00005555555e859e in webdriver::server::Dispatcher::run::h746a8bf2f0bc24fd ()\n 0x000055555569ff0f in std::sys_common::backtrace::__rust_begin_short_backtrace::h3b920773bd467d2a ()\n 0x00005555555dbc99 in core::ops::function::FnOnce::call_once{{vtable.shim}}::h81ba7228877515f7 ()\n 0x00005555558d31a3 in std::sys::unix::thread::Thread::new::thread_start::h4514580219a899c5 ()\n 0x00007ffff7d0ce24 in start_thread () from .../lib/libc.so.6\n 0x00007ffff7d8e9b0 in clone3 () from .../lib/libc.so.6\n\nThe reason why I found this odd was because it happens in the following\npiece of code (shortened a bit):\n\n 1 static const char * rewrite(const char * path, char * buf)\n 2 {\n 3 if (path == NULL) return path;\n 4 for (int n = 0; n < nrRedirects; ++n) {\n 5 int len = strlen(from[n]);\n 6 if (strncmp(path, from[n], len) != 0) continue;\n 7 if (snprintf(buf, PATH_MAX, \"%s%s\", to[n], path + len) >= PATH_MAX)\n 8 abort();\n 9 return buf;\n 10 }\n 11 return path;\n 12 }\n\nWhen inspecting the assembly, I found that the check for the null\npointer in line 3 was completely missing and the code was directly\nentering the loop and then eventually segfault when running strncmp()\nwith a null pointer as its first argument.\n\nI confirmed that indeed that check was missing by compiling libredirect\nwith \"-O0\" and comparing the generated assembly with the optimized one.\nThe one compiled with \"-O0\" had that check while the optimized one did\nnot and indeed when running geckodriver with the unoptimized version it\nworked fine.\n\nDigging in the Git history, I found 5677ce200831a83a7b3d37f2cfc4ec00c10,\nwhich actually introduced the null pointer check. Going back to that\ncommit however, the check actually was still in the generated assembly.\n\nSo I bisected between that commit and the most recent one and ended up\nwith commit ca8aa5dc877344082864cf75512e59c7a1d0ad8c, which moved\neverything to use GCC 7.\n\nI haven't found out why *exactly* GCC was optimizing the check away, but\nplaying around on Godbolt with various other compilers seems that other\ncompilers such as Clang are doing it as well. Additionally, given that\npassing NULL to stat() is UB, my guess is that compilers tend to assume\nthat such an argument can't be NULL. My assumption is based on the fact\nthat GCC warns with \"argument 1 null where non-null expected\" when\npassing NULL to eg. stat().\n\nTo address this for now, I marked the path argument of the rewrite()\nvolatile and also added a test that should cause a segfault in case this\nwould regress again as it already did.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"libredirect: Fix segfault handling null paths"}},{"before":"25168e12086d8efe0379ab684b85e90dd26b61d6","after":"8339afc285a2f4c2e69ccbd3c0dec2eb7966b146","ref":"refs/heads/libredirect-null-paths","pushedAt":"2023-07-09T19:53:27.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"libredirect: Fix segfault handling null paths\n\nWhile using libredirect in conjunction with geckodriver, I stumbled on\nodd segfaults that happened when running the wrapped statx() call from\nlibredirect:\n\n 0x00007ffff7ddd541 in __strncmp_avx2 () from .../lib/libc.so.6\n 0x00007ffff7f6fe57 in statx () from .../lib/libredirect.so\n 0x00005555558d35bd in std::sys::unix::fs::try_statx::h2045d39b0c66d4e8 ()\n 0x00005555558d2230 in std::sys::unix::fs::stat::ha063998dfb361520 ()\n 0x0000555555714019 in mozversion::firefox_version::hdc3b57eb04947426 ()\n 0x00005555556a603c in geckodriver::capabilities::FirefoxCapabilities::version::h58e289917bd3c721 ()\n 0x00005555556a77f5 in ::validate_custom::h62d23cf9fd63b719 ()\n 0x000055555562a7c8 in webdriver::capabilities::SpecNewSessionParameters::validate::h60da250d33f0989f ()\n 0x00005555556d7a13 in as core::iter::traits::iterator::Iterator>::try_fold::h9427a360a3d0bf8f ()\n 0x0000555555669d85 in as alloc::vec::spec_from_iter::SpecFromIter>::from_iter::hd274d536ea29bb33 ()\n 0x00005555555c05ef in core::iter::adapters::try_process::hdf96a01ec1f9b8bd ()\n 0x000055555561768d in ::match_browser::hfbd8c38f6db17e9f ()\n 0x00005555555ca6ef in >::handle_command::h13b98b9cb87a69d6 ()\n 0x00005555555e859e in webdriver::server::Dispatcher::run::h746a8bf2f0bc24fd ()\n 0x000055555569ff0f in std::sys_common::backtrace::__rust_begin_short_backtrace::h3b920773bd467d2a ()\n 0x00005555555dbc99 in core::ops::function::FnOnce::call_once{{vtable.shim}}::h81ba7228877515f7 ()\n 0x00005555558d31a3 in std::sys::unix::thread::Thread::new::thread_start::h4514580219a899c5 ()\n 0x00007ffff7d0ce24 in start_thread () from .../lib/libc.so.6\n 0x00007ffff7d8e9b0 in clone3 () from .../lib/libc.so.6\n\nThe reason why I found this odd was because it happens in the following\npiece of code (shortened a bit):\n\n 1 static const char * rewrite(const char * path, char * buf)\n 2 {\n 3 if (path == NULL) return path;\n 4 for (int n = 0; n < nrRedirects; ++n) {\n 5 int len = strlen(from[n]);\n 6 if (strncmp(path, from[n], len) != 0) continue;\n 7 if (snprintf(buf, PATH_MAX, \"%s%s\", to[n], path + len) >= PATH_MAX)\n 8 abort();\n 9 return buf;\n 10 }\n 11 return path;\n 12 }\n\nWhen inspecting the assembly, I found that the check for the null\npointer in line 3 was completely missing and the code was directly\nentering the loop and then eventually segfault when running strncmp()\nwith a null pointer as its first argument.\n\nI confirmed that indeed that check was missing by compiling libredirect\nwith \"-O0\" and comparing the generated assembly with the optimized one.\nThe one compiled with \"-O0\" had that check while the optimized one did\nnot and indeed when running geckodriver with the unoptimized version it\nworked fine.\n\nDigging in the Git history, I found 5677ce200831a83a7b3d37f2cfc4ec00c10,\nwhich actually introduced the null pointer check. Going back to that\ncommit however, the check actually was still in the generated assembly.\n\nSo I bisected between that commit and the most recent one and ended up\nwith commit ca8aa5dc877344082864cf75512e59c7a1d0ad8c, which moved\neverything to use GCC 7.\n\nI haven't found out why *exactly* GCC was optimizing the check away, but\nplaying around on Godbolt with various other compilers seems that other\ncompilers such as Clang are doing it as well. Additionally, given that\npassing NULL to stat() is UB, my guess is that compilers tend to assume\nthat such an argument can't be NULL. My assumption is based on the fact\nthat GCC warns with \"argument 1 null where non-null expected\" when\npassing NULL to eg. stat().\n\nTo address this for now, I marked the path argument of the rewrite()\nvolatile and also added a test that should cause a segfault in case this\nwould regress again as it already did.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"libredirect: Fix segfault handling null paths"}},{"before":null,"after":"25168e12086d8efe0379ab684b85e90dd26b61d6","ref":"refs/heads/libredirect-null-paths","pushedAt":"2023-07-09T19:49:32.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"libredirect: Fix segfault handling null paths\n\nWhile using libredirect in conjunction with geckodriver, I stumbled on\nodd segfaults that happened when running the wrapped statx() call from\nlibredirect:\n\n 0x00007ffff7ddd541 in __strncmp_avx2 () from .../lib/libc.so.6\n 0x00007ffff7f6fe57 in statx () from .../lib/libredirect.so\n 0x00005555558d35bd in std::sys::unix::fs::try_statx::h2045d39b0c66d4e8 ()\n 0x00005555558d2230 in std::sys::unix::fs::stat::ha063998dfb361520 ()\n 0x0000555555714019 in mozversion::firefox_version::hdc3b57eb04947426 ()\n 0x00005555556a603c in geckodriver::capabilities::FirefoxCapabilities::version::h58e289917bd3c721 ()\n 0x00005555556a77f5 in ::validate_custom::h62d23cf9fd63b719 ()\n 0x000055555562a7c8 in webdriver::capabilities::SpecNewSessionParameters::validate::h60da250d33f0989f ()\n 0x00005555556d7a13 in as core::iter::traits::iterator::Iterator>::try_fold::h9427a360a3d0bf8f ()\n 0x0000555555669d85 in as alloc::vec::spec_from_iter::SpecFromIter>::from_iter::hd274d536ea29bb33 ()\n 0x00005555555c05ef in core::iter::adapters::try_process::hdf96a01ec1f9b8bd ()\n 0x000055555561768d in ::match_browser::hfbd8c38f6db17e9f ()\n 0x00005555555ca6ef in >::handle_command::h13b98b9cb87a69d6 ()\n 0x00005555555e859e in webdriver::server::Dispatcher::run::h746a8bf2f0bc24fd ()\n 0x000055555569ff0f in std::sys_common::backtrace::__rust_begin_short_backtrace::h3b920773bd467d2a ()\n 0x00005555555dbc99 in core::ops::function::FnOnce::call_once{{vtable.shim}}::h81ba7228877515f7 ()\n 0x00005555558d31a3 in std::sys::unix::thread::Thread::new::thread_start::h4514580219a899c5 ()\n 0x00007ffff7d0ce24 in start_thread () from .../lib/libc.so.6\n 0x00007ffff7d8e9b0 in clone3 () from .../lib/libc.so.6\n\nThe reason why I found this odd was because it happens in the following\npiece of code (shortened a bit):\n\n 1 static const char * rewrite(const char * path, char * buf)\n 2 {\n 3 if (path == NULL) return path;\n 4 for (int n = 0; n < nrRedirects; ++n) {\n 5 int len = strlen(from[n]);\n 6 if (strncmp(path, from[n], len) != 0) continue;\n 7 if (snprintf(buf, PATH_MAX, \"%s%s\", to[n], path + len) >= PATH_MAX)\n 8 abort();\n 9 return buf;\n 10 }\n 11 return path;\n 12 }\n\nWhen inspecting the assembly, I found that the check for the null\npointer in line 3 was completely missing and the code was directly\nentering the loop and then eventually segfault when running strncmp()\nwith a null pointer as its first argument.\n\nI confirmed that indeed that check was missing by compiling libredirect\nwith \"-O0\" and comparing the generated assembly with the optimized one.\nThe one compiled with \"-O0\" had that check while the optimized one did\nnot and indeed when running geckodriver with the unoptimized version it\nworked fine.\n\nDigging in the Git history, I found 5677ce200831a83a7b3d37f2cfc4ec00c10,\nwhich actually introduced the null pointer check. Going back to that\ncommit however, the check actually was still in the generated assembly.\n\nSo I bisected between that commit and the most recent one and ended up\nwith commit ca8aa5dc877344082864cf75512e59c7a1d0ad8c, which moved\neverything to use GCC 7.\n\nI haven't found out why *exactly* GCC was optimizing the check away, but\nplaying around on Godbolt with various other compilers seems that other\ncompilers such as Clang are doing it as well.\n\nTo address this for now, I marked the path argument of the rewrite()\nvolatile and also added a test that should cause a segfault in case this\nwould regress again as it already did.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"libredirect: Fix segfault handling null paths"}},{"before":"9b6f9e462436c27dade3f263a337d67625f27b32","after":null,"ref":"refs/heads/fix-taskserver-test","pushedAt":"2023-06-06T16:03:42.382Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"}},{"before":null,"after":"9b6f9e462436c27dade3f263a337d67625f27b32","ref":"refs/heads/fix-taskserver-test","pushedAt":"2023-06-04T21:25:16.931Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"nixos/tests/taskserver: Fix build\n\nThe test fails because the way the configuration switch was implemented\nback then was by using a dummy configuration and simply activating that\ndummy configuration from within the test script.\n\nNowadays, this doesn't work anymore and fails to typecheck because the\ndummy \"newServer\" will inherit the same value for networking.hostName,\nwhich in turn will generate two attributes for \"server\":\n\n > testScriptWithTypes:43: error: Name \"server\" already defined on line 43\n > [no-redef]\n > client1: Machine; client2: Machine; server: Machine; server: Machine;\n\nFortunately, we don't need to do workarounds like this anymore and there\nis the \"specialisation\" option, which allows to do this in a less ugly\nway (and it also works with mypy).\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"nixos/tests/taskserver: Fix build"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAADfimxqgA","startCursor":null,"endCursor":null}},"title":"Activity ยท aszlig/nixpkgs"}