-
Notifications
You must be signed in to change notification settings - Fork 55
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
Valgrind tests seem to work #22
Comments
I see that the Ubuntu version which I am using has patches for at least one memory leak… |
I searched for and attempted to contact François Pinard: his email address bounces and I can't find any other contact for him. I suggest therefore that I make a friendly fork of recode, which incorporates at least the Debian patches, and perhaps any others I can easily find in other major distros. I'm having a go at getting the current Recode 3.7beta repo code up and running (if that doesn't work, I can revert to 3.6+patches); it seems fairly straightforward. |
On Fri, 12 Jan 2018 18:04:50 +0000 (UTC) Reuben Thomas ***@***.***> wrote:
I searched for and attempted to contact François Pinard: his email address
bounces and I can't find any other contact for him.
I suggest therefore that I make a friendly fork of recode, which incorporates
at least the Debian patches, and perhaps any others I can easily find in
other major distros.
Sounds good. Go for it, and thanks.
… I'm having a go at getting the current Recode 3.7beta repo code up and
running (if that doesn't work, I can revert to 3.6+patches); it seems fairly
straightforward.
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
http://www.shlomifish.org/humour/bits/facts/Summer-Glau/
C++ supports Object‐Oriented Programming roughly as much as COBOL supports
Functional Programming.
— http://www.shlomifish.org/humour.html
Please reply to list if it's a mailing list post - http://shlom.in/reply .
|
On Fri, 12 Jan 2018 17:21:46 +0000 (UTC) Reuben Thomas ***@***.***> wrote:
If I comment out the `plan skip_all` line, and instead uncomment the `plan 1`
line, I get:
/home/rrt/.local/var/repo/fortune-mod/fortune-mod/tests/t/valgrind.t ................
ok
So are the tests passing, or am I somehow failing to run them?
what does `./fortune` say? Did you do a "make install" first?
Regards,
Shlomi Fish
…--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Escape from GNU Autohell - http://www.shlomifish.org/open-source/anti/autohell/
An original philosopher knows the right combination of ideas to steal.
Please reply to list if it's a mailing list post - http://shlom.in/reply .
|
Yes, I did
I can see all the fortunes files in I tried I ran cmake as:
|
On Fri, 12 Jan 2018 20:21:04 +0000 (UTC) Reuben Thomas ***@***.***> wrote:
Yes, I did `make install`.
$ ./fortune
No fortunes found
$ ~/.local/games/fortune
No fortunes found
so it isnt properly installed.
I can see all the fortunes files in `~/.local/share/games/fortunes`.
I tried `make clean` and remaking.
I ran cmake as:
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local
Try running:
cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local ..
make
make install
./fortune
In a fresh build directory.
…--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Humanity - Parody of Modern Life - http://shlom.in/humanity
Better be a tail for the lions, than the head of the jackals.
— Pirkei Avot, 4 15
Please reply to list if it's a mailing list post - http://shlom.in/reply .
|
Great, that works! Now I get two test failures (3 subtest failures):
It's odd, as the Valgrind log file has no errors I can see:
|
Hi,
On Sat, 13 Jan 2018 09:13:05 +0000 (UTC) Reuben Thomas ***@***.***> wrote:
Great, that works! Now I get two test failures (3 subtest failures):
/home/rrt/.local/var/repo/fortune-mod/fortune-mod/tests/t/trailing-space-and-CRs.t ..
Dubious, test returned 2 (wstat 512, 0x200) Failed 2/3 subtests
/home/rrt/.local/var/repo/fortune-mod/fortune-mod/tests/t/valgrind.t ................
1/1
It's odd, as the Valgrind log file has no errors I can see:
==30682== Memcheck, a memory error detector
==30682== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==30682== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright
info ==30682== Command: ./fortune
==30682== Parent PID: 30603
==30682==
==30682==
==30682== HEAP SUMMARY:
==30682== in use at exit: 9,714 bytes in 164 blocks
this must be "in use at exit: 0 bytes".
Regards,
Shlomi
… ==30682== total heap usage: 5,280 allocs, 5,116 frees, 252,644 bytes
allocated ==30682==
==30682== LEAK SUMMARY:
==30682== definitely lost: 0 bytes in 0 blocks
==30682== indirectly lost: 0 bytes in 0 blocks
==30682== possibly lost: 0 bytes in 0 blocks
==30682== still reachable: 9,714 bytes in 164 blocks
==30682== suppressed: 0 bytes in 0 blocks
==30682== Reachable blocks (those to which a pointer was found) are not
shown. ==30682== To see them, rerun with: --leak-check=full
--show-leak-kinds=all ==30682==
==30682== For counts of detected and suppressed errors, rerun with: -v
==30682== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
http://www.shlomifish.org/humour/Summerschool-at-the-NSA/
“A is A, and A is not not-A? WTH is he talking about??! Of course A can be
not-A! I want a little of the stuff he’s on!”
— Initial reaction to the http://en.wikipedia.org/wiki/Organon
Please reply to list if it's a mailing list post - http://shlom.in/reply .
|
OK, I've now got recode resurrected and ready to test with fortune-mod. What is the problem here? Is it that the memory still in use should have been freed? |
On Sat, 13 Jan 2018 13:15:33 -0800 Reuben Thomas ***@***.***> wrote:
OK, I've now got recode resurrected and ready to test with fortune-mod.
wonderful.
What is the problem here? Is it that the memory still in use should have been
freed?
Yes, see https://en.wikipedia.org/wiki/Memory_leak .
…--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
http://www.shlomifish.org/humour/bits/facts/Summer-Glau/
Because you can't just make shit up and expect the computer to magically know
what you mean, Retardo!
— Mark Jason Dominus, http://perl.plover.com/Questions4.html
Please reply to list if it's a mailing list post - http://shlom.in/reply .
|
It's OK, you don't need to educate me about basic concepts: I have two degrees in computer science and I have been working as a programmer for nearly 30 years. Thanks, though, for taking the time to add explanation in case I needed it. The point is that having memory in use when a program exits is usually no problem (that is why I wouldn't usually regard it as an error), because, as you know, memory used by a process is returned to the system when the process exits. Hence, I would only usually worry about unreachable memory. So I'm not quite sure you understood my question; I'd just like to check: I think in this case you want to check that the recode library has freed all the memory it allocated, and you're saying it has not; am I right? |
On Sat, 13 Jan 2018 21:39:55 +0000 (UTC) Reuben Thomas ***@***.***> wrote:
It's OK, you don't need to educate me about basic concepts: I have two
degrees in computer science and I have been working as a programmer for
nearly 30 years. Thanks, though, for taking the time to add explanation in
case I needed it.
The point is that having memory in use when a program exits is usually no
problem (that is why I wouldn't usually regard it as an error), because, as
you know, memory used by a process is returned to the system when the process
exits. Hence, I would only usually worry about unreachable memory.
So I'm not quite sure you understood my question; I'd just like to check: I
think in this case you want to check that the recode library has freed all
the memory it allocated, and you're saying it has not; am I right?
yes, you are right.
…--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Chuck Norris/etc. Facts - http://www.shlomifish.org/humour/bits/facts/
Cats know what we feel. They don’t care, but they know.
— Source unknown, via Nadav Har’El.
Please reply to list if it's a mailing list post - http://shlom.in/reply .
|
Just a quick (non-)update: in fact, I spent the last 24 hours battling with my attempts to fix all warnings in recode. I have completed this now. I have also found that the current code in fact already has all the Debian patches applied (including the space leak fix). I should get to testing with fortune-mod tomorrow. |
On Sun, 14 Jan 2018 22:22:16 +0000 (UTC) Reuben Thomas ***@***.***> wrote:
Just a quick (non-)update: in fact, I spent the last 24 hours battling with
my attempts to fix all warnings in recode. I have completed this now. I have
also found that the current code in fact already has all the Debian patches
applied (including the space leak fix). I should get to testing with
fortune-mod tomorrow.
Thanks! Where can I find the recode repository?
…--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
My Photos - http://www.flickr.com/photos/shlomif/
* Backward compatibility is your worst enemy.
* Backward compatibility is your users’ best friend.
Please reply to list if it's a mailing list post - http://shlom.in/reply .
|
Seems like it is https://github.com/rrthomas/Recode |
Yes, that's it. I'm currently setting up Travis and AppVeyor CI. |
I ran the test you posted at pinard/Recode#7 and found all memory was freed. |
I ran the valgrind tests with It's not clear to me that this is really a problem, so perhaps you want to relax the requirement, and only look for actual leaks, not memory in use when the program ends? |
On Mon, 15 Jan 2018 23:08:57 +0000 (UTC) Reuben Thomas ***@***.***> wrote:
I ran the test you posted at pinard/Recode#7 and found all memory was freed.
thanks! I'll check it out.
…--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Free (Creative Commons) Music Downloads, Reviews and more - http://jamendo.com/
Q: I’ll be about 6.5 milliard Terran years next September.
— http://www.shlomifish.org/humour/Star-Trek/We-the-Living-Dead/
Please reply to list if it's a mailing list post - http://shlom.in/reply .
|
"valgrind doesn't lie.". See #22 (comment) . Now the valgrind test passes with the new Recode at https://github.com/rrthomas/Recode .
Thanks @rrthomas ! I have now fixed these mem leaks which were fortune.c's fault. The valgrind test now passes with your Recode. |
Great, thanks! Glad you don't now have to find an alternative to recode. I am still going through the list of Debian bugs and fixing all the easy ones and those with patches. Then I shall do the same for François Pinard's GitHub (unfortunately I found out he died a few years ago), and then I shall make a release. |
On Tue, 16 Jan 2018 01:36:10 -0800 Reuben Thomas ***@***.***> wrote:
Great, thanks!
Thank you too for the lead.
Glad you don't now have to find an alternative to recode.
Yes.
I am
still going through the list of Debian bugs and fixing all the easy ones and
those with patches.
Nice, thanks!
Then I shall do the same for François Pinard's GitHub
(unfortunately I found out he died a few years ago),
oh, sorry to hear that.
and then I shall make a
release.
Thanks!
…--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Chuck Norris/etc. Facts - http://www.shlomifish.org/humour/bits/facts/
He who reinvents the wheel will likely design a square wheel and spend a year
trying to figure out why it doesn’t work properly.
— Nadav Har’El, http://www.shlomifish.org/humour.html
Please reply to list if it's a mailing list post - http://shlom.in/reply .
|
Closing this issue as FIXED. Thanks! |
@rrthomas : I suggest you enable the Issues tracker on your fork of the recode repo - currently it is disabled. Please let me know when you mint a new release so I can release a new version of fortune-mod. |
Done, thanks for the hint. |
By the way, in case I forget to get in touch when I make the release, it will be a normal GitHub release, so subscribing to release notifications on my project will be sufficient. |
On Thu, 18 Jan 2018 15:21:36 -0800 Reuben Thomas ***@***.***> wrote:
By the way, in case I forget to get in touch when I make the release, it will
be a normal GitHub release, so subscribing to release notifications on my
project will be sufficient.
thanks, and thanks!
…--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
http://youtu.be/KxGRhd_iWuE - Never Give Up!!
Linux — Because Software Problems Should not Cost Money.
— http://www.shlomifish.org/art/linux_banner/
Please reply to list if it's a mailing list post - http://shlom.in/reply .
|
If I comment out the
plan skip_all
line, and instead uncomment theplan 1
line, I get:So are the tests passing, or am I somehow failing to run them?
The text was updated successfully, but these errors were encountered: