Issue773

Title fsanitize=undefined warnings
Priority bug Status resolved
Assigned To fluzz Keywords
Linked issues Watchers fluzz

Submitted on 2014-11-17 22h04 by matthiaskrgr, last changed by fluzz.

Messages
Author: matthiaskrgr Date: 2014-11-17   22h04
found via clang 3.5
./configure --enable-sanitize=address CFLAGS="-fsanitize=undefined" CC=clang; make



when a positional sound is played ( the  -262.562 seems to be x or y position?
(positional sounds?))  :
/home/matthias/vcs/git/freedroid/src/sound.c:497:2: runtime error: value
-262.562 is outside the range of representable values of type 'unsigned short'


when tux is dropped on the level/a level is being initialized:
influ.c:599:16: runtime error: index -1 out of bounds for type 'level *[100]'


opening "notes" in quest browser:
quest_browser_ui.c:164:34: runtime error: index -1 out of bounds for type 'int [50]'


starting hacking game:
takeover.c:948:13: runtime error: index 24 out of bounds for type 'struct image
[16]'
takeover.c:949:4: runtime error: index 24 out of bounds for type 'struct image [16]'
takeover.c:950:4: runtime error: index 24 out of bounds for type 'struct image [16]'


when tux dies:
/home/matthias/vcs/git/freedroid/src/hud.c:73:2: runtime error: value -1.71914
is outside the range of representable values of type 'unsigned short'
Author: fluzz Date: 2014-12-13   17h55
>> when tux is dropped on the level/a level is being initialized:
>> influ.c:599:16: runtime error: index -1 out of bounds for type 'level *[100]'

Fixed in commit 8a7ecb4
Author: fluzz Date: 2015-01-04   14h09
>> when a positional sound is played ( the  -262.562 seems to be x or y position?
>> (positional sounds?))  :
>> /home/matthias/vcs/git/freedroid/src/sound.c:497:2: runtime error: value
>> -262.562 is outside the range of representable values of type 'unsigned short'

Fixed in commit 8d40a77f24
Author: fluzz Date: 2015-01-04   14h24
>> opening "notes" in quest browser:
>> quest_browser_ui.c:164:34: runtime error: index -1 out of bounds for typ 'int
[50]'

Fixed in commit 692b4b8bfd

>> starting hacking game:
>> takeover.c:948:13: runtime error: index 24 out of bounds for type 'struct
image [16]'
>> takeover.c:949:4: runtime error: index 24 out of bounds for type 'struct
image [16]'
>> takeover.c:950:4: runtime error: index 24 out of bounds for type 'struct
image [16]'

Fixed in commit bdc254284ed7

>> when tux dies:
>> /home/matthias/vcs/git/freedroid/src/hud.c:73:2: runtime error: value -1.71914
>> is outside the range of representable values of type 'unsigned short'

Fixed in commit d84c988060e
History
Date User Action Args
2015-01-04 14:24:05fluzzsetstatus: open -> resolved
messages: + msg3021
2015-01-04 14:09:14fluzzsetassignedto: fluzz
messages: + msg3020
nosy: + fluzz
2014-12-13 17:55:47fluzzsetmessages: + msg3005
2014-11-17 22:04:11matthiaskrgrcreate