[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #19168 [Core Tor/Tor]: Integer overflows in case conversion tables
#19168: Integer overflows in case conversion tables
--------------------------+------------------------------------
Reporter: cypherpunks | Owner:
Type: defect | Status: needs_revision
Priority: Medium | Milestone: Tor: 0.2.9.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
--------------------------+------------------------------------
Comment (by cypherpunks):
Sorry for mixing up the terminology. It came from the message GCC was
giving me
{{{
error: overflow in implicit constant conversion [-Werror=overflow]
}}}
Because the tables contain integers, i figured they are integer overflows
but i stand corrected.
This error was thrown by compiling Tor with GCC in pedantic mode. As you
mention, this behavior is implementation-defined. To quote the document
for this specific case
{{{
Otherwise, the new type is signed and the value cannot be represented in
it; either the
result is implementation-defined or an implementation-defined signal is
raised.
}}}
In the first case, the resulting values differ from what is expected. In
cases where it matters, future developers will have to waste time again to
trace these difference back to these tables. In the second case, some
implementations are free to raise signals which Tor would need handle.
This would require new code with the chance of introducing new bugs. To
avoid all this, I think applying the patch (after changing it to use
proper terminology) would prevent future headaches.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19168#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs