Opened 17 years ago
Closed 16 years ago
#97 closed defect (fixed)
r.random fails with bus error on Mac OS X 10.5
Reported by: | cmbarton | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | 6.4.0 |
Component: | Default | Version: | unspecified |
Keywords: | r.random Mac | Cc: | |
CPU: | Unspecified | Platform: | MacOSX |
Description
I just learned that r.random fails completely on OS X 10.5. It is working on my OS X 10.4 PowerBook. it fails to create either raster or vector points and exits with a bus error. Try making points from the Spearfish elevation.10m map.
Michael
Change History (6)
follow-up: 2 comment:1 by , 17 years ago
comment:2 by , 17 years ago
Replying to kyngchaos:
verified bus error on Leopard and OK on tiger, SVN 3/8. Here is the thread trace from the crashlog:
Thread 0 Crashed: 0 r.random 0x000021a7 set_max + 103 1 r.random 0x00002498 get_stats + 686
I don't know if it's related to the crash, but the way that the RASTER_PTR union is used in get_stats violates ANSI C aliasing rules. Specifically, the code stores a pointer in data.v but then uses data.[cfd]. Because those fields have different types, the compiler is entitled to treat the fields as distinct, even though they overlap. E.g. if it has a copy of data.c in a register, and you modify data.v, references to data.c may still use the value stored in the register.
As for the crash, we really need at least a proper backtrace with argument values, and ideally the values of any relevant variables.
comment:4 by , 17 years ago
Milestone: | 6.3.0 → 6.4.0 |
---|
comment:5 by , 16 years ago
CPU: | → Unspecified |
---|---|
Platform: | → MacOSX |
comment:6 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Tested with GRASS 6.4. No problems
verified bus error on Leopard and OK on tiger, SVN 3/8. Here is the thread trace from the crashlog: