Bug report #4509
Crash on SPARC when opening vector layer
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | Vectors | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Sparc Solaris | Easy fix?: | No |
Pull Request or Patch supplied: | Yes | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | Yes | Copied to github as #: | 14431 |
Description
QGIS crashes with "signal BUS (invalid address alignment)" on Sparc Solaris when opening a shape file. I have tracked the problem down to src/core/symbology-ng/qgsrendererv2.cpp and I attach a proposed patch. As I understand it, Sparc and other RISC processors only allow memory access on certain memory boundaries so maybe memcpy is safer than pointer casting when dealing with WKBs. It seems other parts of QGIS already do this.
I think this will likely be a problem on ARM chips also as they have a similar limitation.
I am happy to do any other testing on Sparc that may be required.
History
#1 Updated by Paolo Cavallini almost 13 years ago
- Category set to Vectors
#2 Updated by Giovanni Manghi almost 13 years ago
- Target version set to Version 1.7.4
#3 Updated by Giovanni Manghi almost 13 years ago
- Affected QGIS version set to master
- Crashes QGIS or corrupts data set to Yes
#4 Updated by Sam Gillingham almost 13 years ago
- File qgsgeometry.cpp.patch added
Found that qgsgeometry.cpp has a similar problem...
#5 Updated by Sam Gillingham over 12 years ago
- File qgslabel.cpp.patch added
Also in qgslabel.cpp - see attached patch. Confirmed that these issues cause similar problems on Linux/ARM.
#6 Updated by Paolo Cavallini over 12 years ago
- Target version changed from Version 1.7.4 to Version 1.8.0
#7 Updated by Sam Gillingham over 12 years ago
- File qgsdistancearea.cpp.patch added
- File qgsgeometry.cpp.patch2 added
Found a couple of missed fixes in qgsgeometry.cpp - see new patch. Also found another file with the problem (qgsdistancearea.cpp).
#8 Updated by Paolo Cavallini about 12 years ago
- Target version changed from Version 1.8.0 to Version 2.0.0
#9 Updated by Paolo Cavallini over 11 years ago
Could you check that the problem is still there? If so, could Marco please revise the patch and apply it if appropriate?
Thanks
#10 Updated by Marco Bernasocchi about 11 years ago
this is also valid for android
#11 Updated by Marco Bernasocchi about 11 years ago
patches updated and partly applyed in https://github.com/mbernasocchi/QGIS/tree/androidFixByteAllign. I'll pull request and close this later this week.
#12 Updated by Paolo Cavallini almost 11 years ago
- Target version changed from Version 2.0.0 to Future Release - High Priority
#13 Updated by Martin Dobias almost 11 years ago
- Resolution set to fixed/implemented
- Status changed from Open to Closed
- Target version changed from Future Release - High Priority to Version 2.2
Some time ago the WKB handling has been updated to use memcpy, so it should be working now in master. Please reopen if there are any remaining issues.