Opened 14 years ago

Closed 14 years ago

#792 closed defect (fixed)

[raster] Addband regresssion test fail on some systems.

Reported by: pracine Owned by: pracine
Priority: blocker Milestone: PostGIS 2.0.0
Component: raster Version: master
Keywords: Cc:

Description

Because casting of float to int produce undefined behaviour.

We must explicitly clamp the value instead of just casting it. See discussion at:

http://postgis.refractions.net/pipermail/postgis-devel/2011-January/011354.html

Change History (7)

comment:1 by mloskot, 14 years ago

To summarise recent discussions, my last proposal was to use clamping functions, Pierre followed with question about truncating and I responded (a bit out of thread but with same subject).

IMO, it is not low priority but at least medium. I think we should decide what to do?

comment:2 by pracine, 14 years ago

Priority: lowmedium

We should implement something like what you proposed.

comment:3 by pracine, 14 years ago

Do we need to do that only for double_to_16_bit conversion or it is necessary for 32 bit and 8 bit as well?

comment:4 by pracine, 14 years ago

Priority: mediumblocker

comment:5 by pracine, 14 years ago

Status: newassigned

comment:6 by pracine, 14 years ago

Fixed in r6920.

Please "make post-install-check" so I can close this one

comment:7 by jorgearevalo, 14 years ago

Resolution: fixed
Status: assignedclosed

post-install-check executed and correct. I close this ticket (open if needed)

Note: See TracTickets for help on using tickets.