Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

libgc tells me "Absurd stack bottom value"

stack

  • Please log in to reply
5 replies to this topic

#1 Groogy

Groogy

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 179 posts

Posted 17 July 2010 - 04:39 AM

Hi!

I'm trying to use the Boehm Garbage Collector C++ version for my project. I am about to attend to The Game Assembly(Professional University in Sweden) and they work in Windows with Visual Studio so I worked in that environment to get used to it. Anyway the problem is that it works perfectly in Windows oddly enough, but when I try to run it(compile works) in Linux I get this error message on the first call to gc:: operator new.

"Absurd stack bottom value"

If I just do a simple test application with the GC library it works. So it seems to be limited to my application. Though I don't know what I could have done to change whatever value it's talking about.

If you need any other information like source code just ask.
  • 0

#2 dargueta

dargueta

    I chown trolls.

  • Moderator
  • 4854 posts
  • Programming Language:C, Java, C++, PHP, Python, JavaScript, Perl, Assembly, Bash, Others
  • Learning:Objective-C

Posted 18 July 2010 - 11:52 PM

Yeah, source code would be helpful.
  • 0

sudo rm -rf / && echo $'Sanitize your inputs!'


#3 Alexander

Alexander

    YOL9

  • Moderator
  • 3963 posts
  • Location:Vancouver, Eh! Cleverness: 200
  • Programming Language:C, C++, PHP, Assembly

Posted 19 July 2010 - 12:15 AM

It seems newer versions of the garbage collector try to determine the stack base address by inspecting /proc/self/stat, which (PaX) clears so libgc halts and gives up. You should be able to recompile libgc with -DUSE_LIBC_PRIVATE telling the libarary to get the address field out of libc from __libc_stack_end. Just a thought.
  • 0

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.


#4 Groogy

Groogy

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 179 posts

Posted 19 July 2010 - 02:01 AM

Yeah I read that but the thing is that it works in other projects on my Linux but not just that one. It's my Madness Script project which is a simple language and I wanted to add a garbage collector to it.

Anyway here's the project. It might be quite large to just go trough. Since I made the new version(2.0.0) I haven't documented it properly and the code feels like it just are mixed together in a wizards pot.

If you can explain better how I could have made so that just for this particular instance the garbage collector aborts, I can give you source concerning something similar.
If you can't come up with such a solution, I'll try with Nullw0rm's solution that they used for some kernel.
  • 0

#5 Groogy

Groogy

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 179 posts

Posted 15 August 2010 - 06:31 AM

Sorry to resurrect this dead thread. But I tried going with Nullworms method and added the -DUSE_LIBC_PRIVATE flag to the makefiles DEFS variable. It compiles just fine but I get the problem of that when I run 'make test' that it fails. I compiled normally and the test worked. But with the flag it complains about "undefined reference to ..." and some different GC_ functions. So seems like doing this makes it not compile all the methods wanted?

Or I might be doing it wrong. There's first a ./configure and after that make so is there a way to add the -DUSE_LIBC_PRIVATE flag trough the CLI without having to go in to the makefile itself and add it? Might just be that I'm adding it at the wrong place.
  • 0
My Code Blog - My Github - Ascension Project - Madness Script Project - Simple-Garbage-Collector Project
There is bound to be something useful somewhere.

#6 dargueta

dargueta

    I chown trolls.

  • Moderator
  • 4854 posts
  • Programming Language:C, Java, C++, PHP, Python, JavaScript, Perl, Assembly, Bash, Others
  • Learning:Objective-C

Posted 15 August 2010 - 08:15 AM

Looking at the man pages for make, I think you're going to have to modify the makefile.

Edit: Please really try not to resurrect old threads.
  • 0

sudo rm -rf / && echo $'Sanitize your inputs!'






Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download