Summary: | xorg-server : fails to compile for MIPS variants with 32-bit pointers | ||||||
---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Vicente Olivert Riera <vincent.riera> | ||||
Component: | Server/General | Assignee: | Xorg Project Team <xorg-team> | ||||
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> | ||||
Severity: | normal | ||||||
Priority: | medium | ||||||
Version: | unspecified | ||||||
Hardware: | Other | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
i915 platform: | i915 features: | ||||||
Attachments: |
|
Description
Vicente Olivert Riera
2014-06-12 10:32:43 UTC
ping I don't believe any Xorg developers have any MIPS64 n32 platforms, nor will they be finding a way to test & fix bugs in them. If someone wants to maintain Xorg for these platforms, they'll need to fix the bugs they hit and submit patches to the xorg-devel mailing list just as all other platform maintainers do. There is no magic solution to make fixes appear with no one willing to work on them. Change the casts in backtrace.c to something like: (void*)(long)(pip.start_ip + off) or (void*)(off_t)(pip.start_ip + off) The intent is to first cast the "word" to a pointer-sized integer, and then cast that to a pointer. On n32, while a sizeof(void*) is 32-bit, it is stored in a register and on the stack as a 64-bit (sign extended) value. Look for MIPSpro(tm) N32 ABI Handbook using your favourite search engine. Created attachment 110406 [details] [review] 0001-backtrace.c-Fix-word-cast-to-a-pointer.patch (In reply to cagney from comment #3) > Change the casts in backtrace.c to something like: > > (void*)(long)(pip.start_ip + off) > or > (void*)(off_t)(pip.start_ip + off) > > The intent is to first cast the "word" to a pointer-sized integer, and then > cast that to a pointer. > > On n32, while a sizeof(void*) is 32-bit, it is stored in a register and on > the stack as a 64-bit (sign extended) value. > > Look for MIPSpro(tm) N32 ABI Handbook using your favourite search engine. I have tried it with MIPS32, MIPS64 n32 and MIPS64 n64. It compiled fine in all cases. I have attached a patch, so please, review it and apply it if you think is valid. Thanks. Just for the record, this failure is present also for MIPS32. And the reason is exactly the same. libunwind uses a uint64 variable to store the words, and Xorg tries to cast that variable (64-bit) into a pointer (32-bit). |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.