1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-08 18:40:55 +03:00
abv 4db4247a0b 0024836: Stack overflow when raising exception in low memory condition
Standard_OutOfMemory exception is refactored so as to avoid memory allocations (which will likely fail) when it is raised:

- method NewInstance() returns static instance (singleton)
- method Raise() raises copy of that singleton, resetting its message string
- message string is stored as field, not allocated dynamically (thus maximum message length is limited by buffer size)

Class Standard_Failure slightly revised: method Destroy() is merged to destructor, methods Get/SetMessageString() are made virtual.

Add test case for the bug
2016-01-21 15:49:51 +03:00
..
2012-12-28 18:50:48 +04:00
2012-12-07 16:29:17 +04:00
2012-12-07 16:29:17 +04:00
2012-12-07 16:29:17 +04:00
2012-12-07 16:29:17 +04:00
2012-12-07 16:29:17 +04:00
2012-12-07 16:29:17 +04:00
2012-12-07 16:29:17 +04:00
2012-12-07 16:29:17 +04:00
2012-12-07 16:29:17 +04:00
2012-12-07 16:29:17 +04:00
2012-12-07 16:29:17 +04:00
2015-11-19 15:31:21 +03:00
2012-12-21 16:39:38 +04:00
2012-12-21 16:39:38 +04:00
2012-12-21 16:39:38 +04:00
2012-12-28 18:50:48 +04:00
2012-12-21 16:39:38 +04:00
2012-12-21 16:39:38 +04:00
2012-12-21 16:39:38 +04:00
2012-12-21 16:39:38 +04:00
2012-12-21 16:39:38 +04:00
2013-02-01 17:32:08 +04:00
2012-12-18 22:35:43 +04:00
2012-12-21 16:39:38 +04:00
2012-11-15 13:23:11 +04:00
2012-12-28 18:50:48 +04:00