Open kyet opened 1 year ago
Hi @kyet,
Thanks for reporting this issue. I've reproduced the same using the official Ubuntu package.
So far I don't see what causes it, perhaps a hardening compiler flag.
Note: On Debian "testing", v2.4.1-2 works as expected, but the same version does not work on Ubuntu 23.04.
Yep, this is caused by the -Wl,-Bsymbolic-functions
linker flag, which is used in Ubuntu builds.
I've submitted a bug report: https://bugs.launchpad.net/ubuntu/+source/criterion/+bug/2018156
Hi. I installed criterion via apt on Ubuntu 22.04. (libcriterion-dev, version:
2.4.0-rc-18-g1cc3911-1
) In order to support custom arguments, I added the main function according to the below manual.Then the following error appeared.
As you probably remember, the error message has been added in the issue below.
If my understanding is correct, in normal operation, boxfort manipulates the main function I added, and when the main function is executed again through fork & execve, the bxfi_exec function should be called by the manipulation.
However, it seems that boxfort manipulated the wrong main function (the main function inside the criterion), and due to this, when the main function is executed, the criterion_run_all_tests function is executed again and an error message is output as an exception handling to prevent falling into an infinite loop.
I'm not familiar with the internals of criterion and boxfort, so you can disregard my assumptions.
Strangely, there is no problem with the package downloaded from github.com (here) and the package I built myself. To experiment with different packages, I used LD_LIBRARY_PATH as in the example below.
So I thought it was not a version issue. I tried compiling using clang instead of gcc as shown below, but there is still no problem with the package I built myself.
I wonder if you can reproduce it too. I've experimented with multiple servers. Thank you for your hard work!