Anonymous | Login | 2024-11-21 15:10 UTC |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0000719 | VCMI | Other | public | 2011-03-31 13:25 | 2014-05-30 17:40 | ||||
Reporter | plush | ||||||||
Assigned To | Tow | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | AMD64 | OS | FreeBSD | OS Version | 8.2 | ||||
Product Version | 0.84 | ||||||||
Target Version | Fixed in Version | 0.85 | |||||||
Summary | 0000719: [PATCH] Make VCMI work under FreeBSD | ||||||||
Description | VMCI compiles and installs under FreeBSD 8.2 but crashes upon start-up with a floating point exception. The problem lies in timeHandler.h, line 21: return ret/(CLOCKS_PER_SEC/1000); This code assumes that CLOCKS_PER_SEC > 1000. Under Linux, clocks() has microsecond resolution so that CLOCKS_PER_SEC = 1000000 and the code works as desired. Under FreeBSD, CLOCKS_PER_SEC = 128, leading to a division by zero. | ||||||||
Steps To Reproduce | Compile, install and attempt to run under FreeBSD. | ||||||||
Additional Information | A clock with microsecond resolution is available under FreeBSD via the getrusage() system call. The attached patch introduces a private method clock() that returns a timestamp with microsecond resolution, mimicking the Linux function. The getDif() method is adjusted to divide by the correct number. Additionally, the fields start, last, mem are made private so that no other class can access them and misinterpret the resolution of these timestamps. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | patch_freebsd [^] (1,550 bytes) 2011-03-31 13:25 [Show Content] | ||||||||
Notes | |
(0001673) Tow (developer) 2011-04-02 23:49 |
Hi, thanks for the detailed report and the patch! :) I've committed a fix based on it (without whole class duplication, when the difference is in one method) in r2058. Please check, if it solves your problem. |
(0001674) plush (reporter) 2011-04-02 23:51 |
Thanks, that's a nice clean-up of my patch. |
Issue History | |||
Date Modified | Username | Field | Change |
2011-03-31 13:25 | plush | New Issue | |
2011-03-31 13:25 | plush | File Added: patch_freebsd | |
2011-04-02 23:49 | Tow | Note Added: 0001673 | |
2011-04-02 23:49 | Tow | Status | new => resolved |
2011-04-02 23:49 | Tow | Fixed in Version | => 0.89 |
2011-04-02 23:49 | Tow | Resolution | open => fixed |
2011-04-02 23:49 | Tow | Assigned To | => Tow |
2011-04-02 23:51 | plush | Note Added: 0001674 | |
2014-05-30 17:40 | beegee | Status | resolved => closed |
Copyright © 2000 - 2024 MantisBT Team |