View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002955 | ardour | bugs | public | 2009-12-12 13:41 | 2020-04-19 20:14 |
| Reporter | johne53 | Assigned To | paul | ||
| Priority | normal | Severity | minor | Reproducibility | random |
| Status | closed | Resolution | fixed | ||
| Product Version | 2.8.3 | ||||
| Summary | 0002955: PBD::FPU::has_denormals_are_zero() uses an unitialised buffer | ||||
| Description | I noticed that PBD::FPU::has_denormals_are_zero() was giving me different results, depending on whether I compiled in Debug mode or Release mode. I found the following code in libs//pbd/fpu.cc asm volatile ( "fxsave (%0)" : : "r" (fxbuf) : "memory" ); uint32_t mxcsr_mask = *((uint32_t*) &fxbuf[28]); where 'fxbuf' is an aligned buffer of 512 bytes. Unfortunately, the x86's 'fxsave' instruction doesn't guarantee to touch all bytes in the supplied buffer and fxbuf[28] is one that isn't guaranteed to get written. Therefore it's important to ensure that the buffer is in a known state before calling fxsave. I added "memset(fxbuf, 0, 512);" just before the call to the inline assembly and now I'm getting consistent results. | ||||
| Tags | No tags attached. | ||||
|
|
fix applied to 3.0 and 2.X along with some inline asm fixes for the cpuid (revs 6419-6421). thanks for tracking this down. |
|
|
Issue has been closed automatically, by Trigger Close Plugin. Feel free to re-open with additional information if you think the issue is not resolved. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2009-12-12 13:41 | johne53 | New Issue | |
| 2009-12-31 17:54 | paul | cost | => 0.00 |
| 2009-12-31 17:54 | paul | Note Added: 0007274 | |
| 2009-12-31 17:54 | paul | Status | new => resolved |
| 2009-12-31 17:54 | paul | Resolution | open => fixed |
| 2009-12-31 17:54 | paul | Assigned To | => paul |
| 2010-04-24 10:28 | cth103 | Category | bugs => bugs2 |
| 2010-04-24 10:30 | cth103 | Category | bugs2 => bugs |
| 2020-04-19 20:14 | system | Note Added: 0022013 | |
| 2020-04-19 20:14 | system | Status | resolved => closed |