mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-12-23 12:03:41 +01:00
(mi_init): Use assertion instead of relying on compiler-optimization
to verify that unw_cursor_t is big enough to contain a cursor. (Logical change 1.207)
This commit is contained in:
parent
2212940f59
commit
db24e76397
1 changed files with 2 additions and 3 deletions
|
@ -23,6 +23,7 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
@ -46,7 +47,6 @@ long unwi_debug_level;
|
||||||
HIDDEN void
|
HIDDEN void
|
||||||
mi_init (void)
|
mi_init (void)
|
||||||
{
|
{
|
||||||
extern void unw_cursor_t_is_too_small (void);
|
|
||||||
#if UNW_DEBUG
|
#if UNW_DEBUG
|
||||||
const char *str = getenv ("UNW_DEBUG_LEVEL");
|
const char *str = getenv ("UNW_DEBUG_LEVEL");
|
||||||
|
|
||||||
|
@ -60,6 +60,5 @@ mi_init (void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (sizeof (struct cursor) > sizeof (unw_cursor_t))
|
assert (sizeof (struct cursor) <= sizeof (unw_cursor_t));
|
||||||
unw_cursor_t_is_too_small ();
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue