[tor-bugs] #29528 [Core Tor/Tor]: UndefinedBehaviorSanitizer errors should fail the unit tests

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Mar 26 08:56:27 UTC 2019


#29528: UndefinedBehaviorSanitizer errors should fail the unit tests
-------------------------------------------------+-------------------------
 Reporter:  teor                                 |          Owner:  (none)
     Type:  defect                               |         Status:
                                                 |  needs_revision
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.4.1.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tor-ci, tor-test, 041-proposed,      |  Actual Points:  0.2
  029-backport, 034-backport, 035-backport,      |
  040-backport                                   |
Parent ID:                                       |         Points:  2
 Reviewer:  nickm                                |        Sponsor:
-------------------------------------------------+-------------------------
Changes (by teor):

 * status:  needs_information => needs_revision


Comment:

 Well, this is truly weird.

 When we pass -fsanitize=undefined:
 https://travis-ci.org/teor2345/tor/jobs/511294592#L2002
 We get:
 {{{
 circuitpadding/circuitpadding_sample_distribution: [forking]
 src/lib/math/prob_distr.c:1311:17: runtime error: division by zero
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
 src/lib/math/prob_distr.c:1311:17 in
 ...
 }}}
 https://travis-ci.org/teor2345/tor/jobs/511294592#L4644

 When we pass -fsanitize=undefined -fno-sanitize-recover=undefined
 -fsanitize-trap=undefined  -fsanitize-undefined-trap-on-error:
 https://travis-ci.org/teor2345/tor/jobs/511273849#L2002
 We get no warnings or errors:
 {{{
 circuitpadding/circuitpadding_sample_distribution: [forking] OK
 }}}
 https://travis-ci.org/teor2345/tor/jobs/511273849#L4648

 That's truly weird. I'm going to have to test the new options one by one,
 to see which one has this unexpected behaviour.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/29528#comment:19>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list