-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plug memory leak #7
base: master
Are you sure you want to change the base?
Conversation
free(p0) Need also to change legacy.h
Unmatched CALLOC
I couldn't pick this thread up on GitHub so assume you got to the bottom of
it – but let me know if not.
…On Tue, 18 Jul 2023 at 09:38, JGLAHE ***@***.***> wrote:
common.h includes R.h but this header isn't among the source files? How
should this be compiled?
Cheers
—
Reply to this email directly, view it on GitHub
<#7 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAM56G5X4SSD5AULBHCQBN3XQZDOHANCNFSM46ZZ43GA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Yes sorry I got confused: aberer/RogueNaRok lists two public forks (the most recent of which is yours), but accessing it from that ms609/RogueNaRok link goes to the ms609:master branch, which is what I cloned, and thus got an error about I commented about it here before I found the ms609:patch-1 branch through somewhere, maybe one of the CRAN pages (I can't recall exactly? obviously I wasn't thinking clearly). But that worked well, so hopefully this eventually gets merged... |
Hi, sorry just getting back to this:
and,
This was via I tried moving some definitions around (processID; bits_in_16bits) and it also complained about globalPArgs in debug and it got rid of the warning but aborted as soon as it started on the examples (I don't know C at all) Cheers |
From the logs, this doesn't look related to the changes introduced in the patch; do you encounter the same issues make-ing the master branch, or do they only occur on the patch?
From: lLLHMM ***@***.***>
Sent: 23 August 2023 16:54
To: aberer/RogueNaRok ***@***.***>
Cc: SMITH, MARTIN R. ***@***.***>; Author ***@***.***>
Subject: Re: [aberer/RogueNaRok] Plug memory leak (#7)
[EXTERNAL EMAIL]
Hi, sorry just getting back to this:
RogueNaRok $make
gcc -c -o common.o common.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o RogueNaRok.o RogueNaRok.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o Tree.o Tree.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o BitVector.o BitVector.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o HashTable.o HashTable.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o List.o List.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o Array.o Array.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o Dropset.o Dropset.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o ProfileElem.o ProfileElem.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o legacy.o legacy.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o newFunctions.o newFunctions.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o parallel.o parallel.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o Node.o Node.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -Wall -D_GNU_SOURCE -O3 -DNDEBUG -o RogueNaRok common.o RogueNaRok.o Tree.o BitVector.o HashTable.o List.o Array.o Dropset.o ProfileElem.o legacy.o newFunctions.o parallel.o Node.o -lm
/usr/bin/ld: RogueNaRok.o:(.bss+0x10080): multiple definition of `processID'; common.o:(.bss+0x480): first defined here
/usr/bin/ld: Tree.o:(.bss+0x0): multiple definition of `bits_in_16bits'; RogueNaRok.o:(.bss+0x80): first defined here
/usr/bin/ld: Tree.o:(.bss+0x10000): multiple definition of `processID'; common.o:(.bss+0x480): first defined here
/usr/bin/ld: BitVector.o:(.bss+0x20): multiple definition of `bits_in_16bits'; RogueNaRok.o:(.bss+0x80): first defined here
/usr/bin/ld: BitVector.o:(.bss+0x10020): multiple definition of `processID'; common.o:(.bss+0x480): first defined here
/usr/bin/ld: HashTable.o:(.bss+0x0): multiple definition of `processID'; common.o:(.bss+0x480): first defined here
/usr/bin/ld: List.o:(.bss+0x0): multiple definition of `processID'; common.o:(.bss+0x480): first defined here
/usr/bin/ld: Dropset.o:(.bss+0x20): multiple definition of `bits_in_16bits'; RogueNaRok.o:(.bss+0x80): first defined here
/usr/bin/ld: Dropset.o:(.bss+0x10020): multiple definition of `processID'; common.o:(.bss+0x480): first defined here
/usr/bin/ld: ProfileElem.o:(.bss+0x0): multiple definition of `bits_in_16bits'; RogueNaRok.o:(.bss+0x80): first defined here
/usr/bin/ld: ProfileElem.o:(.bss+0x10000): multiple definition of `processID'; common.o:(.bss+0x480): first defined here
/usr/bin/ld: legacy.o:(.bss+0x0): multiple definition of `bits_in_16bits'; RogueNaRok.o:(.bss+0x80): first defined here
/usr/bin/ld: legacy.o:(.bss+0x10000): multiple definition of `processID'; common.o:(.bss+0x480): first defined here
/usr/bin/ld: newFunctions.o:(.bss+0x0): multiple definition of `bits_in_16bits'; RogueNaRok.o:(.bss+0x80): first defined here
/usr/bin/ld: newFunctions.o:(.bss+0x10000): multiple definition of `processID'; common.o:(.bss+0x480): first defined here
/usr/bin/ld: Node.o:(.bss+0x0): multiple definition of `processID'; common.o:(.bss+0x480): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:49: RogueNaRok] Error 1
and,
RogueNaRok $make
gcc -c -o common.o common.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o RogueNaRok.o RogueNaRok.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o Tree.o Tree.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o BitVector.o BitVector.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o HashTable.o HashTable.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o List.o List.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o Array.o Array.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o Dropset.o Dropset.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o ProfileElem.o ProfileElem.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o legacy.o legacy.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o newFunctions.o newFunctions.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o parallel.o parallel.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -c -o Node.o Node.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
gcc -Wall -D_GNU_SOURCE -O3 -DNDEBUG -o RogueNaRok common.o RogueNaRok.o Tree.o BitVector.o HashTable.o List.o Array.o Dropset.o ProfileElem.o legacy.o newFunctions.o parallel.o Node.o -lm
/usr/bin/ld: RogueNaRok.o:(.bss+0x10080): multiple definition of `processID'; common.o:(.bss+0x480): first defined here
/usr/bin/ld: Tree.o:(.bss+0x0): multiple definition of `bits_in_16bits'; RogueNaRok.o:(.bss+0x80): first defined here
/usr/bin/ld: Tree.o:(.bss+0x10000): multiple definition of `processID'; common.o:(.bss+0x480): first defined here
/usr/bin/ld: BitVector.o:(.bss+0x20): multiple definition of `bits_in_16bits'; RogueNaRok.o:(.bss+0x80): first defined here
/usr/bin/ld: BitVector.o:(.bss+0x10020): multiple definition of `processID'; common.o:(.bss+0x480): first defined here
/usr/bin/ld: HashTable.o:(.bss+0x0): multiple definition of `processID'; common.o:(.bss+0x480): first defined here
/usr/bin/ld: List.o:(.bss+0x0): multiple definition of `processID'; common.o:(.bss+0x480): first defined here
/usr/bin/ld: Dropset.o:(.bss+0x20): multiple definition of `bits_in_16bits'; RogueNaRok.o:(.bss+0x80): first defined here
/usr/bin/ld: Dropset.o:(.bss+0x10020): multiple definition of `processID'; common.o:(.bss+0x480): first defined here
/usr/bin/ld: ProfileElem.o:(.bss+0x0): multiple definition of `bits_in_16bits'; RogueNaRok.o:(.bss+0x80): first defined here
/usr/bin/ld: ProfileElem.o:(.bss+0x10000): multiple definition of `processID'; common.o:(.bss+0x480): first defined here
/usr/bin/ld: legacy.o:(.bss+0x0): multiple definition of `bits_in_16bits'; RogueNaRok.o:(.bss+0x80): first defined here
/usr/bin/ld: legacy.o:(.bss+0x10000): multiple definition of `processID'; common.o:(.bss+0x480): first defined here
/usr/bin/ld: newFunctions.o:(.bss+0x0): multiple definition of `bits_in_16bits'; RogueNaRok.o:(.bss+0x80): first defined here
/usr/bin/ld: newFunctions.o:(.bss+0x10000): multiple definition of `processID'; common.o:(.bss+0x480): first defined here
/usr/bin/ld: Node.o:(.bss+0x0): multiple definition of `processID'; common.o:(.bss+0x480): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:49: RogueNaRok] Error 1
?
-
Reply to this email directly, view it on GitHub<#7 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAM56G2JB2JBPK35ORV7RBLXWXALDANCNFSM46ZZ43GA>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
Thank you for the quick response! I assume I can just use the patch-1 makefile for the master branch (there's no makefile)? Anyway, make just gave me the same error as last time:
|
I meant for the RogueNaRok master branch, rather than the ms609 repo (which is modified to be called from inside R, rather than as a standalone app, and thus lacks a makefile).
If it is simpler you could manually copy the modifications to your own branch of the main repo?
From: lLLHMM ***@***.***>
Sent: 23 August 2023 19:01
To: aberer/RogueNaRok ***@***.***>
Cc: SMITH, MARTIN R. ***@***.***>; Author ***@***.***>
Subject: Re: [aberer/RogueNaRok] Plug memory leak (#7)
[EXTERNAL EMAIL]
Thank you for the quick response!
I assume I can just use the patch-1 makefile for the master branch (there's no makefile)?
Anyway, make just gave me the same error as last time:
RogueNaRok $make
gcc -c -o common.o common.c -Wall -D_GNU_SOURCE -O3 -DNDEBUG
In file included from common.c:31:
common.h:43:10: fatal error: R.h: No such file or directory
43 | #include <R.h>
| ^~~~~
compilation terminated.
make: *** [Makefile:53: common.o] Error 1
-
Reply to this email directly, view it on GitHub<#7 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAM56G7LSRZRCTJBYDXAIBTXWXPILANCNFSM46ZZ43GA>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
Yes, sorry I misunderstood; yes I'll fork it cheers |
p0 seems never to be
free
d.This PR adds a record of its unincremented address to the
tr
object, andfree
s it infreeTree()
.valgrind suggests that this plugs the leak.