Skip to content
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

SIGBUS clang with OpenBSD #1341

Open
ETLegacyTeam opened this issue Mar 5, 2020 · 3 comments
Open

SIGBUS clang with OpenBSD #1341

ETLegacyTeam opened this issue Mar 5, 2020 · 3 comments
Labels
🐞 Bug Something isn't working cat: general Category engine (client/server) ❓ Feedback Further information is requested P3: Normal Priority 3
Milestone

Comments

@ETLegacyTeam
Copy link
Member

Author: namtsui (namtsui)
Date: 2019-08-27
Redmine Issue: 1341, https://dev.etlegacy.com/issues/1341


I am trying to write an OpenBSD port for etlegacy. It receive a SIGBUS when compiling with clang 8.0.0, without debug symbols. I am able to run the game successfully with gcc (debug/no debug) and clang (debug). Only clang without debug symbols exhibits this behavior.

Attached:
my_configure_debug: make configure in OpenBSD ports with debug flags turned on
my_configure_reg: " with debug flags off
my_build_debug: make update-plist in OpenBSD ports with debug flags turned on
my_build_reg: " with debug flags off
my_log_debug: game startup with debug flags on (OK)
my_log_reg: game startup with debug flags off (fails)

I notice that when the game is starting without an ~/.etlegacy folder, it takes two or three restarts during normal operation. However, the regular clang build will go from
Initializing Legacy ui
directly to:
----- CL_Shutdown -----
as shown in my_log_reg.

I sprinkled in COM_Printf's and saw that in client/cl_ui.c in CL_InitUI(void), the last call to

fails to get past this point.

in qcommon/vm.c:

This call

fails to get past this point.

In sys/sys_main.c I printed out the signal in Sys_SigHandler(int signal) and noticed that it was 10, which is a SIGBUS.

@ETLegacyTeam ETLegacyTeam added 🐞 Bug Something isn't working cat: general Category engine (client/server) labels Mar 5, 2020
@ETLegacyTeam
Copy link
Member Author

From: @rmarquis (Spyhawk)
Date: 2019-08-28T10:00:08Z


The fact the issue appears in release only makes me believe this is closely related to our shameful 64bit issue. See #1211, #1089.

@ETLegacyTeam ETLegacyTeam added the P3: Normal Priority 3 label Mar 5, 2020
@ETLegacyTeam ETLegacyTeam added this to the 2.77 milestone Mar 5, 2020
@ETLegacyTeam
Copy link
Member Author

From: @rafal1137 (RaFaL)
Date: 2019-09-03T17:57:06Z


Had similiar issue on Android port
This is how I solved it: 6fe7815

After that I could run App and was inside Main Menu.

@rmarquis
Copy link
Contributor

@namtsui You might want to try again. The 64 bit issue has been solved, and adding some ifdef for *BSD as mentioned by rafal1137 might work.

@rmarquis rmarquis changed the title SIGBUS clang SIGBUS clang with OpenBSD Aug 8, 2020
@Aranud Aranud added the ❓ Feedback Further information is requested label Oct 23, 2020
@rmarquis rmarquis modified the milestones: 2.77, Future Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug Something isn't working cat: general Category engine (client/server) ❓ Feedback Further information is requested P3: Normal Priority 3
Projects
None yet
Development

No branches or pull requests

3 participants