Solaris / OpenSolarisThis forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am using Solaris 9/sparc64, I ran my code on sparc, compiled using cc 5.2 update 1 version. it crashes when it tries to free() a string variable (pointer variable for a string) and to narrow down the issue i print the address and string before doing free(p), it has proper address and string it got displayed in the STDOUT but when it tries to free that pointer it crashes.
Please let me know your inputs to resolve this issue.
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547
Rep:
Well, without seeing any code... I'd naturally guess that something is wrong with the code rather than with a library. Bugs related with memory management may be subtle and your code may or may not crash immediately, that's not a proof.
Well, without seeing any code... I'd naturally guess that something is wrong with the code rather than with a library. Bugs related with memory management may be subtle and your code may or may not crash immediately, that's not a proof.
Can you show us the code?
I knew there are some debuggers for especially for memories those are valgrind and mcheck available only on Linux boxes, But the problem i am facing here in Solaris.
Can anybody suggest are there any kind of tools are available for memory debugging on Solaris (like in Linux Boxes).
my observation is when i ran application directly from shell it crashes so i set LD_PRELOAD = libumem.so.1 and UMEM_DEBUG = default then i ran the application the ran fine.
I cant predict where the issue is? [ from kernel? or from application? ]
One more question, how to core files using gcore command, to run gcore it requires "pid" but when ran the application it ran fastly so i could not find "pid". please let me know.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.