| Summary: | Possible gcc bug with objective C instance allocation | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Bruno Wolff III <bruno> | ||||
| Component: | gcc | Assignee: | Jakub Jelinek <jakub> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | rawhide | CC: | aravindvijayan224185, bruno, jakub | ||||
| Target Milestone: | --- | Keywords: | Reopened | ||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2012-02-06 15:37:54 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Bug Depends On: | |||||||
| Bug Blocks: | 773185 | ||||||
| Attachments: |
|
||||||
|
Description
Bruno Wolff III
2012-02-04 19:28:02 UTC
Thank you for your report,
"I made a few changes to raidem to get it to with gcc 4.7 in rawhide" -- please attach the changes you have made. Consider adding data on " Actual results: Expected results:" fields ,and the stack trace.
--
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
There isn't much to say about the expected results. The game segfaults before any visible output is displayed by the game.
The changes included to get the game to build for gcc 4.7 are already in the latest version (0.3.1-19.fc17) of raidem in Fedora, but I'll attach the patch that is included in the srpm.
The traceback from gdb is:
Program received signal SIGSEGV, Segmentation fault.
__objc_responds_to (sel=<optimized out>, object=0x8136460)
at /usr/src/debug/gcc-4.7.0-20120126/libobjc/sendmsg.c:398
398 res = sarray_get_safe (dtable, (size_t) sel->sel_id);
(gdb) where
#0 __objc_responds_to (sel=<optimized out>, object=0x8136460)
at /usr/src/debug/gcc-4.7.0-20120126/libobjc/sendmsg.c:398
#1 __objc_forward (object=0x8136460, sel=0x8136430, args=0xbfffec90)
at /usr/src/debug/gcc-4.7.0-20120126/libobjc/sendmsg.c:905
#2 0x41138d7c in __objc_word_forward (rcv=0x8136460, op=0x8136430)
at /usr/src/debug/gcc-4.7.0-20120126/libobjc/sendmsg.c:844
#3 0x0809814d in ?? ()
#4 0x0804f0d0 in ?? ()
#5 0x0804bda3 in ?? ()
#6 0x4c4ce645 in __libc_start_main (main=0x804bd30, argc=1,
ubp_av=0xbfffef84, init=0x80c5dd0, fini=0x80c5e40,
rtld_fini=0x4c49d920 <_dl_fini>, stack_end=0xbfffef7c) at libc-start.c:226
#7 0x0804d8e9 in ?? ()
This shows where in the objective C library this is dying. In raidem this is happening when doing an alloc for a Token object. The token code is in include/seborrhea/token.h and src/seborrhea/token.m.
The Token structure is:
@interface Token: Object
{
enum TOKEN_TYPE type;
union {
struct {
char *str;
unsigned int len;
} string;
struct {
int num;
} fixnum;
} data;
}
Created attachment 559471 [details]
This is the patch used to fix the build after the mass rebuild attempt failed.
-- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers Why did you close this bug? Apologizing i think this bug was fixed, > This is the patch used to fix the build after the mass rebuild attempt failed. -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers No. That patch was used to fix FTBFS between raidem-0.3.1-19.fc17 and raidem-0.3.1-19.fc19. However after raidem was building successfully it didn't actually work. I suspect this is a problem with gcc, but don't know for sure. I guess this is related to http://gcc.gnu.org/ml/gcc-patches/2011-06/msg00254.html The segfault is because: 901 /* First try if the object understands forward::. */ 902 if (! frwd_sel) 903 frwd_sel = sel_get_any_uid ("forward::"); 904 905 if (__objc_responds_to (object, frwd_sel)) in __objc_forward has frwd_sel NULL when calling __objc_responds_to, supposedly because -forward:: has been removed from Object.m. Please talk to Nicola Pero on how you should adjust your code. Thanks for the help. I think this means that raidem is using a depreciated feature and this isn't actually a gcc bug, so I am going to close this and just track the issue through the raidem bug. |