New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add platform support for Linux/m68k #51
Conversation
…ALIGN On m68k, 'long long' is 16-bit aligned while 'sem_t' is 32-bit aligned and we must therefore include 'sem_t' when determining the values for FB_ALIGNMENT and FB_DOUBLE_ALIGN. Otherwise, the futex system call will fail on these systems.
I just added another patch on top to fix the generator script for the linker version script. The version scripts must include _IO_stdin_used when using the glibc as otherwise the application can crash or caused unexpected behavior on some architectures, see:
|
The GNU C library supports two ABIs for libio, one is the pre-2.1 ABI and the other is the current one. In order to determine which ABI is to be used, the C library checks whether the _IO_stdin_used symbol is exported by the executable. In case the symbol is present, the new ABI is assumed, if the symbol is missing, the old ABI is assumed. Thus, if an application is linked against a modern version of glibc, it must export the _IO_stdin_used symbol as otherwise the executable can crash or provoke other unexpected behavior on some architectures like PowerPC or MIPS because the C library is using the old ABI in this case.
Looks like fix with _IO_stdin_used will be useful for linux on any HW platform? |
Hi Alex! Yes, this fix should be included regardless the architecture. Without the additional symbol, Firebird will crash or misbehave on PowerPC, MIPS, Alpha among others and the toolchain therefore always includes the symbol by default when not using a linker script, e.g. amd64: glaubitz@ikarus: Damyan has also included this fix in the Debian package [1] and firebird3.0 now builds fine everywhere which it didn't before. |
With gcc 7.1.0 on x86_64, and firebird 2.5.8 sources, I'm also getting this: make[2]: *** [../gen/Makefile.refDatabases:68: empty.fdb] Segmentation fault |
@themaddoctor This is a different issue. Version 2.5.8 doesn't use any version scripts, so it cannot be affected by the missing _IO_stdin_used on Linux. You should open a new issue instead. Although I'm not sure whether 2.5.8 is still supported. |
Then what is this issue, which has the same symptoms, and seg faults on the same executable? |
A segfault is a very generic error message. Just because you see two cases of a segfault, does not mean you are seeing the same bug. As I said before, Firebird 2.5.x does not use version scripts, so this cannot be the same bug. If you want to know what your problem is, please build Firebird with debug symbols enabled and use gdb to generate a usable backtrace. |
|
Can you please open a new issue for that? This isn't related. |
Do you mean a new "pull request"? Because there is no "issues" tab in this project, as far as I can see. |
Bug tracker is here |
Hello!
Here's my V2 patch series to add platform support for Linux/m68k. I will open another PR shortly for the 3.0 branch.
Thanks,
Adrian