-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
[Memory] Valgrind notify "Use of uninitialised value" and "Conditional jump or move depends on uninitialised value" #3089
Comments
All of them are related to Leptonica, so we need to check whether latest Leptonica still shows them or not. |
leptonica 1.75 is very old. Use the latest version 1.78. |
I would like to attach result of leptonica 1.80 (latest version of leptonica - http://www.leptonica.org/download.html) Result of tesseract
Result when run with leptonica functions
DiscussionAs my view point, different version of leptonica will have different memory issues, however, if user of tesseract know what version of leptonica using by tesseract without memory issues, that will be very good for user. Best regards, |
Thank you for the new test results. CC @DanBloomberg who maintains Leptonica. Repeating the test with a debug build of Leptonica and the test program would also show the problematic lines of code. |
Thank you for this detailed report, includling the short program surfacing the errors. I was unable to reproduce your error, perhaps because you didn't include the image "have-image.PNG". lept_version: leptonica-1.81.0 (note: version 1.81.0 isn't released; it's what you get from the github master) Was that the image you used in "have-image.PNG"? |
Hi @DanBloomberg , I would like to send leptonica-1.80 result, running information and image.
Following are all data: Discussion
|
Hi @DanBloomberg ,
Thank you for your efforts! |
@nam-leduc, I tried your example with Leptonica from git master on latest Ubuntu bionic and could not reproduce the bug.
|
I noticed that you have a different valgrind. I used valgrind-3.13.0. |
I can not reproduce it with either valgrind-3.13.0 or 3.15.0.
Dan
…On Sun, Sep 6, 2020 at 10:17 AM Stefan Weil ***@***.***> wrote:
I noticed that you have a different valgrind. I used valgrind-3.13.0.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3089 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD7KMLF72IMJMZD23RMW5ODSEO72TANCNFSM4Q2UEQ7A>
.
|
I made a stab at fixing this. |
@DanBloomberg , thank for your check, it is strange for me, I will test it with your valgrind version and latest version of leptonica. My valgrind version are 3.16.1 (on above information).
Maybe more than 12h later, because now, I can't access to home's PC. |
note that it may now be fixed. To test as it was, remove the call to |
Hi @DanBloomberg , it still be strange for me.
and it still meet the problem I will change my virtual machine, re-test it and report later. |
Hi @DanBloomberg , I used docker container 18.04 and still meet the problem. docker-command.log What ubuntu version did you test? |
I see that you used a cmake build while I used autotools. That's a difference, although it should not cause such errors. My test was with Ubuntu 18.04, no docker, leptonica built using |
Likewise with Ubuntu 18.04. I used the static makefile. g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 @nam-leduc Does it still reproduce with the change to seedfill.c? |
Hi @stweil and @DanBloomberg , following are result when I use command of @stweil problems disappeared --> it's strange again. 👶 I tried with Could you please check with cmake build? Edit: |
I verify that I get the error messages when building with cmake. Why would building with cmake be different from autotools? |
Succeeded in getting the errors with make using the static makefile, on a simpler case: pix2 = pixRead("uninit.png"); However, this only happens using the default (optimizing) compiler. If you build with debug, there is no error. I need to find where the memory is not being initialized. It may be in the morphological operations. |
As I suspected, the problem was in the "safe" closing operation. |
@nam-leduc |
Hi @DanBloomberg , thank you for your fix. I already seen your fix, however, I don't go home today, so I can't test it again. I will comeback and show you the test information later. |
Hi @DanBloomberg , thank you so much for your fix. I would like to confirm that this bug issue don't happen on latest version of leptonica DanBloomberg/leptonica@d276e15 Hi @stweil and @DanBloomberg , Additionally I also tested with tesseract and don't see issue of this bug. |
Hi all,
I run valgrind and see the memory issue of tesseract, it is not memory access violation, however, it should be care for making result of running stable.
Environment
Tesseract Version:
Commit: 162f370 (Merge pull request Fix separator line detector #3082 from bertsky/fix-line-detector)
Platform: Ubuntu 18.04.4 LTS
Tessdata: https://raw.githubusercontent.com/tesseract-ocr/tessdata/master/eng.traineddata
Tesseract input/output
Following are input image:
https://user-images.githubusercontent.com/8704662/92300832-517da180-ef88-11ea-8ce3-149bd3e79bc3.PNG
My command:
Following are valgrind log with 11 memory issues
valgrind-memory-log.txt
Best regards,
Le Duc. Nam
The text was updated successfully, but these errors were encountered: