This website requires JavaScript.
Explore
Help
Register
Sign In
Virtualization
/
dtc
mirror of
https://gitlab.com/qemu-project/dtc.git
Watch
1
Star
0
Fork
You've already forked dtc
0
Code
Issues
Projects
Releases
Wiki
Activity
0931cea3ba
dtc
/
tests
/
division-by-zero.dts
7 lines
64 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Prevent crash on division by zero Currently, attempting to divide by zero in an integer expression in a dts file will cause dtc to crash with a division by zero (SIGFPE). This patch corrects this to properly detect this case and raise an error. Reported-by: Anton Blanchard <anton@samba.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-01-03 19:27:32 +08:00
/dts-v1/;
/ {
Prevent crash on modulo by zero 1937095 "Prevent crash on division by zero" fixed a crash when attempting a division by zero using the / operator in a dts. However, it missed the precisely equivalent crash with the % (modulus) operator. This patch fixes the oversight. Reported-by: Anton Blanchard <anton@samba.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-01-12 16:27:25 +08:00
prop-div = < (1/0) >;
prop-mod = < (1%0) >;
Prevent crash on division by zero Currently, attempting to divide by zero in an integer expression in a dts file will cause dtc to crash with a division by zero (SIGFPE). This patch corrects this to properly detect this case and raise an error. Reported-by: Anton Blanchard <anton@samba.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-01-03 19:27:32 +08:00
};