[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #29527 [Core Tor/Tor]: Division by zero: undefined behaviour in circuitpadding/circuitpadding_sample_distribution test
#29527: Division by zero: undefined behaviour in
circuitpadding/circuitpadding_sample_distribution test
-------------------------------------------------+-------------------------
Reporter: teor | Owner: (none)
Type: defect | Status:
| needs_review
Priority: High | Milestone: Tor:
| 0.4.0.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: regression, tor-ci, tor-test, | Actual Points:
040-must |
Parent ID: | Points:
Reviewer: mikeperry | Sponsor:
-------------------------------------------------+-------------------------
Comment (by riastradh):
Replying to [comment:11 asn]:
> The first commit (a64ccf151f) fixes the probability distribution
parameters that Riastradh mentioned with bold in comment:7. The second
commit (f708055e9f) silences float-divide-by-zero as suggested by #29528.
Cool. One suggestion for a change and one comment:
- It might be helpful if you put a comment on each line describing what
the name and purpose of the parameter is, like `k, shape parameter`,
because I can never remember which one goes first and which one goes last.
- This is the kind of code where the `struct weibull dist = {
WEIBULL(dist), k = ..., lambda = ...}` can be much more legible than
`struct circpad_distribution dist = { .type = CIRCPAD_DIST_WEIBULL,
.param1 = ..., .param2 = ... }`. (Obviously changing the code to work
like that here is more involved than would be warranted, even if you
wanted it, for this particular issue, of course.)
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/29527#comment:13>
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