View Issue Details

IDProjectCategoryView StatusLast Update
0025537CommunityOCCT:Application Frameworkpublic2017-09-29 16:25
ReporterVico Liang Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2013 
Product Version6.8.0 
Target Version7.2.0Fixed in Version7.2.0 
Summary0025537: XmlMPrsStd_PositionDriver::Paste runtime check crash.
Description
void XmlMPrsStd_PositionDriver::Paste
                (const Handle(TDF_Attribute)& theSource,
                 XmlObjMgt_Persistent&        theTarget,
                 XmlObjMgt_SRelocationTable&  ) const
{
  Handle(TDataXtd_Position) aTPos = Handle(TDataXtd_Position)::DownCast(theSource);
  if (!aTPos.IsNull())
  {
    gp_Pnt aPos = aTPos->GetPosition();
    char buf [64];

    // BUG: Run-Time Check Failure 0000002 - Stack around the variable 'buf' was corrupted.
    Sprintf (buf, "%.17g %.17g %.17g", aPos.X(), aPos.Y(), aPos.Z());

    XmlObjMgt::SetStringValue(theTarget.Element(), buf);
  }
}
Steps To Reproducebugs/caf/bug25537
TagsNo tags attached.
Test case numberbugs caf bug25537

Activities

git

2017-05-22 14:36

administrator   ~0066393

Branch CR25537 has been created by mpv.

SHA-1: 5b98d99f8d40fcd3246027460656cd51e5ec88f2


Detailed log of new commits:

Author: mpv
Date: Mon May 22 14:35:57 2017 +0300

    25537: XmlMPrsStd_PositionDriver::Paste runtime check crash.
    
    Increased a size of buffer in array of 'char' to fit the largest possible conversion from 'double' to %.17g string.

kgv

2017-05-22 14:49

developer   ~0066395

-    char buf [64];
+    char buf[64]; // (24 + 1) * 3

Misprint?

mpv

2017-05-22 15:06

developer   ~0066398

Yes. To be checked why tests are passed with this.

git

2017-05-22 15:59

administrator   ~0066404

Branch CR25537 has been updated by mpv.

SHA-1: 20ccb174cb25d8ce510ad8783f6ec3c68df66ceb


Detailed log of new commits:

Author: mpv
Date: Mon May 22 15:58:51 2017 +0300

    // update of the fix and test script to be able to reproduce Centroid case too

mpv

2017-05-22 16:00

developer   ~0066405

Updated the mentioned cxx and the unit-test. Please, review.

mkv

2017-05-24 14:45

tester   ~0066522

Dear BugMaster,
Branch CR25537 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 20ccb174cb25d8ce510ad8783f6ec3c68df66ceb

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 64 (64 on master)
Windows: 0 (0 on master)
MacOS : 1188

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR25537-master-OCCT/Debian70-64/bugs/caf/bug25537.html
http://occt-tests/CR25537-master-OCCT/Windows-64-VC10/bugs/caf/bug25537.html
bugs caf bug25537: OK

Testing on Linux:
occt component :
Total MEMORY difference: 91684952 / 91612646 [+0.08%]
Total CPU difference: 18890.89000000025 / 18660.510000000344 [+1.23%]
products component :
Total MEMORY difference: 31357468 / 31347866 [+0.03%]
Total CPU difference: 5415.229999999982 / 5401.239999999972 [+0.26%]
Testing on Windows:
occt component :
Total MEMORY difference: 58430497 / 58426283 [+0.01%]
Total CPU difference: 17815.11139869865 / 17319.43382129878 [+2.86%]
products component :
Total MEMORY difference: 22719531 / 22681228 [+0.17%]
Total CPU difference: 5385.014119099968 / 5370.256424499971 [+0.27%]

There are no differences in images found by testdiff.

mkv

2017-05-24 14:45

tester   ~0066523

Dear BugMaster,
Branch CR25537 is TESTED.

git

2017-05-29 16:05

administrator   ~0066731

Branch CR25537 has been deleted by kgv.

SHA-1: 20ccb174cb25d8ce510ad8783f6ec3c68df66ceb

Related Changesets

occt: master a38db39d

2017-05-22 11:35:57

mpv


Committer: bugmaster Details Diff
0025537: XmlMPrsStd_PositionDriver::Paste runtime check crash.

Increased a size of buffer in array of 'char' to fit the largest possible conversion from 'double' to %.17g string.
Affected Issues
0025537
mod - src/XmlMDataXtd/XmlMDataXtd_PositionDriver.cxx Diff File
mod - src/XmlMXCAFDoc/XmlMXCAFDoc_CentroidDriver.cxx Diff File
mod - src/XmlObjMgt/XmlObjMgt_GP.cxx Diff File
add - tests/bugs/caf/bug25537 Diff File

Issue History

Date Modified Username Field Change
2014-11-28 15:06 Vico Liang New Issue
2014-11-28 15:06 Vico Liang Assigned To => szy
2015-12-15 14:06 abv Target Version 7.0.0 => 7.1.0
2016-02-17 18:20 szy Assigned To szy => mpv
2016-10-25 16:08 mpv Target Version 7.1.0 => 7.2.0
2017-05-22 14:36 git Note Added: 0066393
2017-05-22 14:38 mpv Assigned To mpv => vro
2017-05-22 14:38 mpv Status new => resolved
2017-05-22 14:38 mpv Steps to Reproduce Updated
2017-05-22 14:49 kgv Note Added: 0066395
2017-05-22 14:50 kgv Description Updated
2017-05-22 15:06 mpv Note Added: 0066398
2017-05-22 15:07 mpv Assigned To vro => mpv
2017-05-22 15:07 mpv Status resolved => assigned
2017-05-22 15:59 git Note Added: 0066404
2017-05-22 16:00 mpv Note Added: 0066405
2017-05-22 16:00 mpv Assigned To mpv => vro
2017-05-22 16:00 mpv Status assigned => resolved
2017-05-23 07:10 vro Assigned To vro => bugmaster
2017-05-23 07:10 vro Status resolved => reviewed
2017-05-23 10:06 mkv Assigned To bugmaster => mkv
2017-05-24 14:45 mkv Note Added: 0066522
2017-05-24 14:45 mkv Note Added: 0066523
2017-05-24 14:45 mkv Assigned To mkv => bugmaster
2017-05-24 14:45 mkv Status reviewed => tested
2017-05-24 14:46 mkv Test case number => bugs caf bug25537
2017-05-26 14:07 bugmaster Assigned To bugmaster => mpv
2017-05-26 14:07 bugmaster Status tested => assigned
2017-05-26 14:43 bugmaster Status assigned => resolved
2017-05-26 14:43 bugmaster Assigned To mpv => bugmaster
2017-05-26 14:43 bugmaster Status resolved => reviewed
2017-05-26 14:43 bugmaster Status reviewed => verified
2017-05-26 14:43 bugmaster Resolution open => fixed
2017-05-26 14:44 bugmaster Status verified => assigned
2017-05-26 14:44 bugmaster Assigned To bugmaster => mpv
2017-05-26 14:44 bugmaster Status assigned => resolved
2017-05-26 14:44 bugmaster Assigned To mpv => bugmaster
2017-05-26 14:44 bugmaster Status resolved => reviewed
2017-05-26 14:44 bugmaster Status reviewed => tested
2017-05-26 14:56 bugmaster Changeset attached => occt master a38db39d
2017-05-26 14:56 bugmaster Status tested => verified
2017-05-29 16:05 git Note Added: 0066731
2017-09-29 16:18 aiv Fixed in Version => 7.2.0
2017-09-29 16:25 aiv Status verified => closed