b***@artifex.com
2017-12-24 18:34:07 UTC
http://bugs.ghostscript.com/show_bug.cgi?id=698832
Bug ID: 698832
Summary: Undefined behavior in int size test
Product: Ghostscript
Version: master
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: P4
Component: Test Framework
Assignee: ***@artifex.com
Reporter: ***@mykolab.com
QA Contact: gs-***@ghostscript.com
Word Size: ---
The file `base/gsserrial.h` is a unit test, and the second of the two loops in
its main function is undefined. Shifting into or out of the sign big is
undefined, and that loop intentionally and deterministically does both.
I see that there's a lot of fancy footwork surrounding integers in that test,
so I don't feel confident changing anything. However, remember that because
it's undefined behavior, there's absolutely no guarantee that because it
behaved as expected in one context because it'll behave as-expected in another.
Is anyone here familiar with what exactly these functions are checking? I'm
happy to help develop a clean, standard-compliant fix.
Thanks for your time,
Michael McConville
Bug ID: 698832
Summary: Undefined behavior in int size test
Product: Ghostscript
Version: master
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: P4
Component: Test Framework
Assignee: ***@artifex.com
Reporter: ***@mykolab.com
QA Contact: gs-***@ghostscript.com
Word Size: ---
The file `base/gsserrial.h` is a unit test, and the second of the two loops in
its main function is undefined. Shifting into or out of the sign big is
undefined, and that loop intentionally and deterministically does both.
I see that there's a lot of fancy footwork surrounding integers in that test,
so I don't feel confident changing anything. However, remember that because
it's undefined behavior, there's absolutely no guarantee that because it
behaved as expected in one context because it'll behave as-expected in another.
Is anyone here familiar with what exactly these functions are checking? I'm
happy to help develop a clean, standard-compliant fix.
Thanks for your time,
Michael McConville
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are receiving this mail because:
You are the QA Contact for the bug.