Recent

Author Topic: valgrind and weird errors  (Read 1405 times)

ertank

  • Sr. Member
  • ****
  • Posts: 274
valgrind and weird errors
« on: February 13, 2019, 11:35:42 am »
Hello,

I am on Raspberry Pi platform. Using Lazarus 2.0.1 r60369M, fpc 3.2.0-beta-r41227

I heard about valgrind and decided to try it in a simple application which uses CThreads. Result was more than 1000 errors. Then I created an empty GUI Application and compiled that empty project right after it is created in Lazarus IDE. I got similar errors displayed. Errors can be found attached.

My question is: Is an empty application really leaking that much memory (about 1K definitely and possibly about 8K as to valgrind) or this is some wrong reporting of valgrind?

Since I am not familiar with the tool I could not understand myself.

Thanks & regards,
Ertan

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: valgrind and weird errors
« Reply #1 on: February 13, 2019, 12:07:35 pm »
Seems that valgrind doesn't understand FPC's generated stackframes (or its debuginfo), and reports errors where it thinks unread stack is read.

This gives all these " invalid read of size 4.... on thread's1 stack"  errors. Which are probably not it.

Reports 1000 such errors and then stops reporting, and the leaks don't seem to be in those 1000 errors, so all we have to go by is the summaries.

What does -gh say ?

ertank

  • Sr. Member
  • ****
  • Posts: 274
Re: valgrind and weird errors
« Reply #2 on: February 13, 2019, 12:54:32 pm »
What does -gh say ?

I am not familiar with -gh use. I simply set it in project options on an empty project and run. When I see form, exit and execution stopped dialog displayed.

 

TinyPortal © 2005-2018