Opened 2 years ago

Closed 2 years ago

#6476 closed defect (fixed)

Can't run debug build on linux

Reported by: phosit Owned by: Vladislav Belov
Priority: Should Have Milestone: Alpha 26
Component: Core engine Keywords:
Cc: Patch: Phab:D4606

Description

If I run pyrogenesis_dbg i get:

Assertion failed: "nm*sz <= ARRAY_SIZE(alloc_bootstrap_buffer)"
Location: Profile.cpp:599 (calloc)

Call stack:

(0x563b9774a2c5) ./binaries/system/pyrogenesis_dbg(+0xa4c2c5) [0x563b9774a2c5]
(0x563b9771d9f0) ./binaries/system/pyrogenesis_dbg(+0xa1f9f0) [0x563b9771d9f0]
(0x563b9771de93) ./binaries/system/pyrogenesis_dbg(+0xa1fe93) [0x563b9771de93]
(0x563b9771e476) ./binaries/system/pyrogenesis_dbg(+0xa20476) [0x563b9771e476]
(0x563b9730c48f) ./binaries/system/pyrogenesis_dbg(calloc+0x9a) [0x563b9730c48f]
(0x7f1107fe2562) /usr/lib/libglib-2.0.so.0(g_malloc0+0x22) [0x7f1107fe2562]
(0x7f1107ff8683) /usr/lib/libglib-2.0.so.0(+0x74683) [0x7f1107ff8683]
(0x7f1107ff9d17) /usr/lib/libglib-2.0.so.0(g_slice_alloc+0x277) [0x7f1107ff9d17]
(0x7f1107fc6403) /usr/lib/libglib-2.0.so.0(g_hash_table_new_full+0x23) [0x7f1107fc6403]
(0x7f1107fe2464) /usr/lib/libglib-2.0.so.0(+0x5e464) [0x7f1107fe2464]
(0x7f1107fa10c9) /usr/lib/libglib-2.0.so.0(+0x1d0c9) [0x7f1107fa10c9]
(0x7f110da67ede) /lib64/ld-linux-x86-64.so.2(+0x5ede) [0x7f110da67ede]
(0x7f110da67fcc) /lib64/ld-linux-x86-64.so.2(+0x5fcc) [0x7f110da67fcc]
(0x7f110da7f96a) /lib64/ld-linux-x86-64.so.2(+0x1d96a) [0x7f110da7f96a]

errno = 0 (Unknown error (0, 0x0))
OS error = ?

test_dbg also don't work:

Assertion failed: "nm*sz <= ARRAY_SIZE(alloc_bootstrap_buffer)"
Location: Profile.cpp:599 (calloc)

Call stack:

(0x558f9906cab2) ./binaries/system/test_dbg(+0xc43ab2) [0x558f9906cab2]
(0x558f990412c4) ./binaries/system/test_dbg(+0xc182c4) [0x558f990412c4]
(0x558f99041767) ./binaries/system/test_dbg(+0xc18767) [0x558f99041767]
(0x558f99041d4a) ./binaries/system/test_dbg(+0xc18d4a) [0x558f99041d4a]
(0x558f98c2a7f7) ./binaries/system/test_dbg(calloc+0x9a) [0x558f98c2a7f7]
(0x7f176e60e562) /usr/lib/libglib-2.0.so.0(g_malloc0+0x22) [0x7f176e60e562]
(0x7f176e624683) /usr/lib/libglib-2.0.so.0(+0x74683) [0x7f176e624683]
(0x7f176e625d17) /usr/lib/libglib-2.0.so.0(g_slice_alloc+0x277) [0x7f176e625d17]
(0x7f176e5f2403) /usr/lib/libglib-2.0.so.0(g_hash_table_new_full+0x23) [0x7f176e5f2403]
(0x7f176e60e464) /usr/lib/libglib-2.0.so.0(+0x5e464) [0x7f176e60e464]
(0x7f176e5cd0c9) /usr/lib/libglib-2.0.so.0(+0x1d0c9) [0x7f176e5cd0c9]
(0x7f1774093ede) /lib64/ld-linux-x86-64.so.2(+0x5ede) [0x7f1774093ede]
(0x7f1774093fcc) /lib64/ld-linux-x86-64.so.2(+0x5fcc) [0x7f1774093fcc]
(0x7f17740ab96a) /lib64/ld-linux-x86-64.so.2(+0x1d96a) [0x7f17740ab96a]

errno = 0 (Unknown error (0, 0x0))
OS error = ?

I'm on Parabola (derived from Arch) linux. I used this build instructions:

export WX_CONFIG=wx-config-gtk3
cd 0ad/build/workspaces
./update-workspaces.sh -j9
cd gcc
make config=debug -j9

make config=debug -j9 outputs this warnings many times:

/usr/include/features.h:412:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
  412 | #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
      |    ^~~~~~~

Change History (2)

comment:1 by phosit, 2 years ago

Patch: Phab:D4606

comment:2 by Vladislav Belov, 2 years ago

Owner: set to Vladislav Belov
Resolution: fixed
Status: newclosed

In 26805:

Removes the Profiler allocation counter. Fixes #6476

Refs rP4805, rP5180, rP13910.

Patch By: smiley

Differential Revision: https://code.wildfiregames.com/D4606

Note: See TracTickets for help on using tickets.