Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6919879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:04:41+00:00 2026-05-27T10:04:41+00:00

EDIT Thanks to all for your input. I guess my question was just a

  • 0

EDIT Thanks to all for your input. I guess my question was just a little to fuzzy. I have thus accepted a sensible answer and opted for 2 hours of stubborn exit(9) debugging and found, or at least removed two bugs, and am now proud to have solved a difficult riddle… 😉

I’ve invested a great deal of time for a problem solution on http://www.spoj.pl , and the program works locally with all the testsamples I have created myself, as well as with those from the problem description.

However, the program aborts with SIGSEGV on the server. There, I have uploaded it with C99 strict language option selected.

EDIT: Let me point out clearly again that there’s absolutely no hint as to how the SIGSEGV occured. The only information that I have is that it occurred at all. Thanks to @Oli Charlesworth for pointing this out.

Locally, I have compiled with both

gcc -Wall -Wextra -std=c99 -o prog prog.c

and

gcc -Wall -Wextra -m32 -std=c99 -o prog prog.c

and everything works fine. The 64bit version was compiled on a regular Debian squeeze amd64 system, the -m32 version on a regular Debian Lenny amd64 system (but only because Squeeze is broken with -m32).

valgrind -v is also perfectly fine with my program.

All my malloc‘s and calloc‘s make sure the return value is nonzero. Except for tsearch, I am not using anything but the very common standard functions.

I would like to collect some pointers as to how I could find out what the problem is. (If there is anything but assuming the input having unexpected properties)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T10:04:42+00:00Added an answer on May 27, 2026 at 10:04 am

    In an environment with such limited feedback, one tool that you can use is what I would call a “binary search” for the source of the problem:

    Start by uploading the simplest “hello world” program that will run on the server, and verify that it does not crash. Then, start adding in chunks of your code until the program does crash. When it does, backtrack and add smaller chunks of code until you have narrowed it down to a particular piece of code that is responsible for the crash.

    Once you have it narrowed down, you can try re-writing the troublesome block of code, or look for a different way to accomplish the right result.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: SOLVED Thanks Brooks. Your question led me to keep digging into if the
REVISED: Okay, thanks to all of your input, I figured out what I was
edit: many thanks for all the answers. Here are the results after applying the
EDIT: I have fixed all but two warnings now, so thank you all for
Please let me know if you have any idea about it. Thanks EDIT What
EDIT : This question duplicates How to access the current Subversion build number? (Thanks
UPDATE: Solved. Thanks BusyMark! EDIT: This is revised based on the answer below from
Why new()/delete() is slower than malloc()/free()? EDIT: Thanks for the answers so far. Please
EDIT: I'm still waiting for more answers. Thanks! In SQL 2000 days, I used
Edit: Translated I have a RSS-feed that i want to parse. It's a podcast

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.