Jump to content
  • Advertisement
Sign in to follow this  

gethostname() throws SIGSEGV at gdb

This topic is 3338 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I can't debug my program with gdb because when it encounters gethostname() it throws a segfault, here's the output from a backtrace.
#0 0x77ea078a in _libkernel32_a_iname () #1 0x76f22e68 in _libkernel32_a_iname () #2 0x0022f280 in ?? () #3 0x77ef460b in _libkernel32_a_iname () #4 0x76f27ca4 in _libkernel32_a_iname () #5 0x76f27c65 in _libkernel32_a_iname () #6 0x76f27bdf in _libkernel32_a_iname () #7 0x71a5a05c in _libkernel32_a_iname () #8 0x71a5c7ce in _libkernel32_a_iname () #9 0x71a5c90c in _libkernel32_a_iname () #10 0x71ab4ece in _libkernel32_a_iname () #11 0x71ab4df6 in _libkernel32_a_iname () #12 0x71ab4d91 in _libkernel32_a_iname () #13 0x71ab2e96 in _libkernel32_a_iname () #14 0x71ab373e in _libkernel32_a_iname () #15 0x71ab3673 in _libkernel32_a_iname () #16 0x71ab5699 in _libkernel32_a_iname () #17 0x71ab55d5 in _libkernel32_a_iname () #18 0x71ab54f0 in _libkernel32_a_iname ()
gethostname works fine when running the program normally. What might the cause be?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!