Bug 1229 - Multiplication overflow in WaypointMobilityModel::EndMobility method
Multiplication overflow in WaypointMobilityModel::EndMobility method
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: mobility models
ns-3.11
All All
: P5 normal
Assigned To: Pavel Boyko
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-01 06:45 EDT by Mauro Tortonesi
Modified: 2011-12-12 07:43 EST (History)
2 users (show)

See Also:


Attachments
Patch fixing WaypointMobilityModel::EndMobility method (438 bytes, text/plain)
2011-08-01 06:45 EDT, Mauro Tortonesi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mauro Tortonesi 2011-08-01 06:45:01 EDT
Created attachment 1215 [details]
Patch fixing WaypointMobilityModel::EndMobility method

Calling the WaypointMobilityModel::EndMobility method results in a multiplication overflow:

-------------------------------------------------------------------
aborted. cond="(hiPart & MASK_HI) != 0", msg="High precision 128 bits multiplication error: multiplication overflow.", file=../src/core/model/int64x64-128.cc, line=57
-------------------------------------------------------------------

due to an unnecessary conversion between double and uint64_t. The attached patch resolves the issue.

My system is a 64-bit Linux machine:

ruby-1.9.2-p290:~/opt/ns-3> uname -a
Linux vulcan 2.6.39-ARCH #1 SMP PREEMPT Sat Jul 9 14:57:41 CEST 2011 x86_64 Intel(R) Core(TM) i7 CPU M 640 @ 2.80GHz GenuineIntel GNU/Linux


Best regards,
Mauro Tortonesi
Comment 1 Kirill Andreev 2011-12-12 07:43:55 EST
Fixed. Changeset 87a5973bad52