Skip to content

VOTable: Add a warning for integers that are out of range#825

Merged
eteq merged 1 commit into
astropy:masterfrom
mdboom:vo/integer-overflow
Feb 27, 2013
Merged

VOTable: Add a warning for integers that are out of range#825
eteq merged 1 commit into
astropy:masterfrom
mdboom:vo/integer-overflow

Conversation

@mdboom

@mdboom mdboom commented Feb 26, 2013

Copy link
Copy Markdown
Contributor

As pointed out by Andy Ptak in the mailing list thread: "Problem reading VOTable produced by HLA", integers that are out-of-range can cause exceptions from Numpy on certain platforms.

To address this (i.e. not crash) as well as to make it more obvious that the VOTable file is malformed, this PR adds a new warning when an integer value is out of range for the size of the field, and also truncates the value to be within range.

@eteq

eteq commented Feb 26, 2013

Copy link
Copy Markdown
Member

Looks good to me if the tests pass.

Hopefully the HLA will fix the actual underlying problem, too.

@mdboom

mdboom commented Feb 26, 2013

Copy link
Copy Markdown
Contributor Author

I got a report about an hour ago from Rick White that this has been fixed upstream, and I just confirmed here:

http://hla.stsci.edu/cgi-bin/hlaSIAP.cgi?inst=ACS&pos=11.888333,-25.288056&size=0.001389

that it has been.

@eteq

eteq commented Feb 27, 2013

Copy link
Copy Markdown
Member

Great, then I'll go ahead and merge this now just in case some other VOTable does this sort of wrongness.

eteq added a commit that referenced this pull request Feb 27, 2013
VOTable: Add a warning for integers that are out of range
@eteq eteq merged commit 358303c into astropy:master Feb 27, 2013
@mdboom

mdboom commented Feb 27, 2013

Copy link
Copy Markdown
Contributor Author

Great -- I just tagged this as 0.2.1 (I wasn't able to yesterday). @iguananaut: hopefully that still means it will end up in your merge queue.

embray pushed a commit to embray/astropy that referenced this pull request Mar 29, 2013
VOTable: Add a warning for integers that are out of range
@mdboom mdboom deleted the vo/integer-overflow branch May 21, 2014 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants