|
Bugzilla – Full Text Bug Listing |
| Summary: | int64x64 error | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Tommaso Pecorella <tommaso.pecorella> |
| Component: | core | Assignee: | Mathieu Lacage <mathieu.lacage> |
| Status: | RESOLVED INVALID | ||
| Severity: | critical | CC: | ns-bugs |
| Priority: | P5 | ||
| Version: | ns-3-dev | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | config.log for ns-3 build | ||
|
Description
Tommaso Pecorella
2011-04-25 11:47:55 UTC
bump (because bugzilla was not sending e-mails) Update on this bug.
The error appears to be in RoutingProtocol::GetSettlingTime
At one point the values of the operands are:
Route SettlingTime: 1.18329e+08 and LifeTime:0.0064106
The code is (with additional debug things):
NS_LOG_DEBUG ("Route SettlingTime: " << mainrt.GetSettlingTime ().GetSeconds ()
<< " and LifeTime:" << mainrt.GetLifeTime ().GetSeconds ());
Time temp = Time (m_weightedFactor * mainrt.GetSettlingTime ());
NS_LOG_DEBUG ("Route SettlingTime * m_weightedFactor : " << temp.GetSeconds () );
temp = temp + Time (1.0 - m_weightedFactor);
NS_LOG_DEBUG ("prev + Time (1.0 - m_weightedFactor) : " << temp.GetSeconds () );
temp = Time (temp * mainrt.GetLifeTime ());
weightedTime = Time ((m_weightedFactor * mainrt.GetSettlingTime () + 1.0 - m_weightedFactor)
* mainrt.GetLifeTime ());
NS_LOG_DEBUG ("Calculated weightedTime:" << weightedTime.GetSeconds ());
return weightedTime;
The partial operation results are:
Route SettlingTime * m_weightedFactor : 1.03538e+08
prev + Time (1.0 - m_weightedFactor) : 1.03538e+08
aborted. cond="(hiPart & MASK_HI) != 0", msg="High precision 128 bits multiplication error: multiplication overflow.", file=../src/core/model/int64x64-128.cc, line=57
The error is in the very last multiplication, operands are:
0x016fd74dadcbdd5d0000000000000000
0x000000000061d16a0000000000000000
(as they appear in "inline int64x64_t &operator *= (int64x64_t &lhs, const int64x64_t &rhs)".
Beside the fact that the previous operation should be double checked per-se, as I doubt it is right (if you check the result is an acceleration, seconds^2), the bug is still there.
The operation is "right" to be in overflow, but someone please explain why the cairo-based 128 multiplication is perfectly fine with this.
I suspect the bug is in the cairo version.
I checked with Tom and it seems he didn't had this overflow due to a "missing" bug in his ns-3 when he launched the AODV/DSDV tests. The multiplication overflow is confirmed to be reproducible, hence it's not a bug per-se. Closing the bug. |