Mantis Bug Tracker

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000817FirmwareCalculations (Inj/Ign)public2013-01-22 08:282014-02-18 23:05
Assigned ToFred 
PlatformOSOS Version
Product Version0.2.0-SNAPSHOT 
Target Version0.2.1Fixed in Version 
Summary0000817: Table lookup routines contain potential for rare divide by zero
DescriptionThis was found by Eric in his unit testing, thanks Eric!! :-)

I will do some research on the effect this has on a running device and post it here soon. I'll also get a fix pushed soon.
TagsNo tags attached.
Issue TypeBug
Risk of Breakagemedium
Attached Filesjpg file icon ediv.jpg [^] (109,190 bytes) 2013-01-22 15:07

- Relationships

-  Notes
User avatar (0002550)
Fred (administrator)
2013-01-22 09:03

Reduced priority and severity to reflect results from over-the-wires testing which shows that the device responds with the correct value and doesn't go crazy or reset. Further research required to find out why this is. I'll expand my OTW test suite this evening to cover this better.
User avatar (0002553)
evortriede (reporter)
2013-01-22 15:08

The EDIV and similar instructions in the S12X appear only to set the C flag upon Divide-by-zero (see attachment) which explains why it does not blow up.
User avatar (0002554)
Fred (administrator)
2013-01-22 15:12

That's true, I read about it, however it's likely not in use with my stuff, because:

A) 32 bit divide
B) Old tool chain that didn't use EDIV

Similar stuff likely was used, though, and likely the same thing was done. What's interesting is that it returns the right number! :-)

Next time just refer to the page number/figure number, everyone has that PDF handy at all times ;-)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker