Help with cURL segfault

This is a discussion on Help with cURL segfault within the C Programming forums, part of the General Programming Boards category; Hello. I've mashed together a program that cURL's Google, attempting to get a JSON response. Everything seems to be going ...

  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 10:29 AM.
    Registered Linux User #380033. Be counted: http://counter.li.org

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,761
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  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, 07:20 AM
  3. cURL and piping
    By carrotcake1029 in forum Windows Programming
    Replies: 1
    Last Post: 09-25-2010, 03:35 PM
  4. curl problem
    By cnu_sree in forum C Programming
    Replies: 5
    Last Post: 10-27-2007, 06:58 AM
  5. cURL class
    By _izua_ in forum C++ Programming
    Replies: 9
    Last Post: 10-14-2007, 08:28 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21