Comments (9)
Interesting.
Out of curiosity, which MemoryOutStream build configuration are you using -- and can you try the other and see if the problem goes away? I don't have any strong hints but that might give us a clue (strcat is called directly in only one variant).
from unittest-cpp.
I did not know there was a configuration setting for MemoryOutStream; where is it? Its probably been the default.
But I still had the files and when I ran it again today I noticed something else. The windows crash report listed a bunch of info (but did not let me copy it to the clipboard) and from that I found out that 0x0022???? is the stack and not a dll or part of the program. That means somehow a call must have been made to possibly garbage on the stack and then there may accidentally have been some bytes representing a call instruction to strcat which may have crashed from wrong callframe/input data?
I zip-ed the builds folder in case you can find more info from the cmake files or like to try running the exe inside a debugger yourself: https://www.dropbox.com/s/no8nm6msze8xi1g/crashing-unittest-cpp-build.zip?dl=0
from unittest-cpp.
Config.h
allows you to customize (either by modifying the file, or by passing defines to CMake) the behavior of MemoryOutStream
. It should probably be explicitly made an option in the CMakeLists.txt instead of being hidden in Config.h, come to think of it.
Let me know if you make any progress on debugging this. I'd be happy to help remotely (via Google Hangouts or the like) sometime if that's an option.
from unittest-cpp.
@wintertime any updates? Again, happy to help with the debugging remotely if possible.
from unittest-cpp.
@pjohnmeyer Sorry to disappoint you, but I neither thought of nor used it meanwhile. My hope was you could do something with the data?
from unittest-cpp.
Unfortunately, no, the data didn't help me much, aside from making it look like the optimizer might be causing a problem. I have not tried to replicate your build environment though; I was hoping to lean on you for that but if I need to get things set up myself then perhaps I will.
from unittest-cpp.
Correct me if I'm wrong, but it looks like the problem isn't in the UNITTEST_TIME_CONSTRAINT macro. It is declaring a TimeConstraint that stores a dangling reference (details) to a temporary constructed in the macro.
Judging by this, and elsewhere, in TestTimeConstraint.cpp, TimeConstraint looks like it wants to m_details to be a const TestDetails, not a reference, forwarding the line number from its parameter when it constructs the member.
Edit: a typo of inconsistency.
from unittest-cpp.
@slephant TimeConstraint takes the UnitTest::TestDetails as a const&, it's fine that's a temporary; it would be a problem if it was a non-const&.
from unittest-cpp.
Closing this due to inability to reproduce.
from unittest-cpp.
Related Issues (20)
- Discussion on "Beyond UnitTest++ 2.0" HOT 9
- Issue with tuples HOT 1
- Mention C++ standard(s) supported in title?
- Mention relevant topics below title
- In CMakeLists.txt, prefer if(MSVC) over if(${CMAKE_CXX_COMPILER_ID}...) HOT 1
- Compatible mocking framework HOT 2
- Can't install using CMake on macOS using Makefiles HOT 6
- A rewrite of UnitTest++ HOT 8
- autoconf-based installation doesn't install UnitTest++Config.cmake
- DeferredTestReporter is missing ReportSummary method. HOT 4
- What's the right way to check that assert has happened?
- MemoryOutStream MUST (probably) call a base class constructor HOT 1
- UNITTEST_ENABLE_SHORT_MACROS 0
- Optionally disabling signal handling HOT 1
- Building UnitTest++ in Ubuntu for Windows: tests fail
- Official project hiatus until 26 November, 2020 HOT 21
- cmake files are not included in the released archive.
- cmake and autoconfig do not generate the same pkgconfig file.
- Some minor modification
- Warnings of high stack usage in MSVC HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unittest-cpp.