Ticket #792 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

[raster] Addband regresssion test fail on some systems.

Reported by: pracine Owned by: pracine
Priority: blocker Milestone: PostGIS 2.0.0
Component: raster Version: trunk
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

Changed 2 years ago by mloskot

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?

Changed 2 years ago by pracine

  • priority changed from low to medium

We should implement something like what you proposed.

Changed 2 years ago by pracine

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?

Changed 2 years ago by pracine

  • priority changed from medium to blocker

Changed 2 years ago by pracine

  • status changed from new to assigned

Changed 2 years ago by pracine

Fixed in r6920.

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

Changed 2 years ago by jorgearevalo

  • status changed from assigned to closed
  • resolution set to fixed

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

Note: See TracTickets for help on using tickets.