Thread: Help with cURL segfault

  1. #1
    Shibby willc0de4food's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    378

    Help with cURL segfault

    Hello. I've mashed together a program that cURL's Google, attempting to get a JSON response. Everything seems to be going fine, until amidst the SSL stuff, it segfaults. Can anyone see why this program is getting a segfault? The audio file that it adds to the form is in the same foulder as the source file / compiled program. Thanks
    Code:
    /* code redacted */
    Last edited by willc0de4food; 08-07-2012 at 09:29 AM.
    Registered Linux User #380033. Be counted: http://counter.li.org

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    So why not run it in the debugger, and find out where it crashes?

    gcc -g prog.c
    gdb ./a.out

    Then type run to run the program.
    When it crashes, type in say 'bt' to tell you where it is.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Shibby willc0de4food's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    378
    Good call :] Thanks, Salem.
    Registered Linux User #380033. Be counted: http://counter.li.org

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 01-25-2012, 11:50 AM
  2. curl problem
    By pramodjha in forum C Programming
    Replies: 1
    Last Post: 03-29-2011, 06:20 AM
  3. cURL and piping
    By carrotcake1029 in forum Windows Programming
    Replies: 1
    Last Post: 09-25-2010, 02:35 PM
  4. curl problem
    By cnu_sree in forum C Programming
    Replies: 5
    Last Post: 10-27-2007, 05:58 AM
  5. cURL class
    By _izua_ in forum C++ Programming
    Replies: 9
    Last Post: 10-14-2007, 07:28 AM