Opened 12 years ago
Closed 10 years ago
#135 closed defect (fixed)
GeodeticTransform.asc compilation segfaults on Solaris
Reported by: | ravenAtSafe | Owned by: | Norm Olsen |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Dictionary Compiler | Version: | |
Keywords: | Cc: |
Description
CS_gxswp always looks at the methodCode after (possibly) swapping the bytes. This is only appropriate when reading.
So on write we end up with a mangled methodCode and therefore garbage transformation params that can cause a segfault (thanks to bad array sizes) when the compiled file is next read (which is done during the compilation).
Change History (3)
comment:1 by , 12 years ago
Owner: | changed from | to
---|
comment:2 by , 10 years ago
Owner: | changed from | to
---|
comment:3 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This was corrected at Revision 2486 by adding a parameter to the previous CS_gxswp function which is TRUE is the parent function requesting the swap is a write. To be compatible with the new csIoUtil.cpp module, two additional functions, CS_gxswpRd and CS_gxswpWr were added which simply call the primary CS_gxswp function with the appropriate value for the new parameter.
This developer does not have access to a big endian machine and could not test this change thoroughly. It was tested in a little endian environment and it was verified that this change did not break anything in that environment.
assigning to me; we'll touch that function anyway when implementing RFC 6