View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001000 | ardour | bugs | public | 2005-05-26 01:25 | 2008-11-20 23:48 |
| Reporter | simbal | Assigned To | paul | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Summary | 0001000: region.cc amd64 issues | ||||
| Description | The functions Region::trim_start and Region::trim_to_internal both contain the following code: long start_shift; if (new_position > _position) { start_shift = new_position - _position; } else { start_shift = -(_position - new_position); } The problem here is that _position and new_position are of type jack_nframes_t, which is defined as uint32_t, but start_shift is (at least on amd64) a 64 bit signed integer. The result of the expression -(_position - new_position) is still an unsigned 32 bit integer and therefore not sign extended to 64 bits when it is assigned to start_shift. This leads to garbage results for the region start and makes it impossible to trim regions. One solution would be to replace that whole if block with start_shift = (int32_t)(new_position - _position); | ||||
| Tags | No tags attached. | ||||