Opened 7 years ago
Closed 7 years ago
#3880 closed defect (fixed)
Undefined behaviour in TYPMOD_GET_SRID
Reported by: | algunenano | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.2.6 |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
Some output examples using undefined behaviour sanitizer:
Running test 'test_typmod_macros' in suite 'serialization/deserialization'. cu_libgeom.c:35:7: runtime error: left shift of 535589632 by 3 places cannot be represented in type 'int' cu_libgeom.c:45:14: runtime error: left shift of 280871168 by 3 places cannot be represented in type 'int'
Basically it's at the mercy of how the compiler/cpu decides to handle the shift.
PR in Github with the fix: https://github.com/postgis/postgis/pull/152
Note:
See TracTickets
for help on using tickets.
In 15914: