[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: A weird bug with luaL_Reg array
- From: Shmuel Zeigerman <shmuz@...>
- Date: Fri, 01 Jul 2022 14:23:04 +0300
On 01/07/2022 14:09, Luiz Henrique de Figueiredo wrote:
Multiple definitions of a global variable are undefined behavior in C.
I'm surprised that you don't get link errors. I do in macOS.
This is a small library "reader.so" containing just one C-file.
So I can hardly imagine how the linker can issue an error.
Here is what ldd shows for reader.so:
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f103188e000)