Hey there! Sign in to join this conversationNew here? Join for free
    • Thread Starter
    Offline

    2
    ReputationRep:
    EDIT: new question below.
    • Thread Starter
    Offline

    2
    ReputationRep:
    Bump
    Offline

    17
    ReputationRep:
    I think it would help if you posted more code. (lista_iter_ver_actual and print_test, at least).
    • Thread Starter
    Offline

    2
    ReputationRep:
    Hey DFranklink, thanks for the reply.
    I finally managed to solve that, the mistake was somewhere else :P

    Nevertheless, I still have one doubt. Towards the end of my program, valgrind shows the following text:
    Code:
    ==5246== Warning: client switching stacks?  SP change: 0x7ff000210 --> 0x700000000
    ==5246==          to suppress, use: --max-stackframe=4278190608 or greater
    ==5246== 
    ==5246== Process terminating with default action of signal 11 (SIGSEGV)
    ==5246==  Access not within mapped region at address 0x700000008
    ==5246==    at 0x400D59: main (pruebas.c:151)
    ...and then there is a segmentation fault.

    Do you know of any reasons why valgrind might think that I switched stacks (whatever that means)?

    Thank you!
    Offline

    0
    ReputationRep:
    (Original post by Miss Mary)
    Hey DFranklink, thanks for the reply.
    I finally managed to solve that, the mistake was somewhere else :P

    Nevertheless, I still have one doubt. Towards the end of my program, valgrind shows the following text:
    Code:
    ==5246== Warning: client switching stacks?  SP change: 0x7ff000210 --> 0x700000000
    ==5246==          to suppress, use: --max-stackframe=4278190608 or greater
    ==5246== 
    ==5246== Process terminating with default action of signal 11 (SIGSEGV)
    ==5246==  Access not within mapped region at address 0x700000008
    ==5246==    at 0x400D59: main (pruebas.c:151)
    ...and then there is a segmentation fault.

    Do you know of any reasons why valgrind might think that I switched stacks (whatever that means)?

    Thank you!
    ==5246== Warning: client switching stacks? SP change: 0x7ff000210 --> 0x700000000

    This means that valgrind spotted such a large change in the stack pointer, that it makes guesses, if it's wrong you'd get a lot more errors than what follows. It would also set memory permissions accordingly. Which doesn't seem to be the case here. Sounds a bit like you're performing recursion?

    Well, clearly you're trying to access data outside of your allocated boundary. www.codepad.org your code. Also see what exit status you're producing, i.e., `echo $?` after running the program.
    Offline

    0
    ReputationRep:
    I wonder what University teaches C/valgrind -- /me would like to attend
    • Thread Starter
    Offline

    2
    ReputationRep:
    (Original post by loulZ)
    ==5246== Warning: client switching stacks? SP change: 0x7ff000210 --> 0x700000000

    This means that valgrind spotted such a large change in the stack pointer, that it makes guesses, if it's wrong you'd get a lot more errors than what follows. It would also set memory permissions accordingly. Which doesn't seem to be the case here. Sounds a bit like you're performing recursion?

    Well, clearly you're trying to access data outside of your allocated boundary. www.codepad.org your code. Also see what exit status you're producing, i.e., `echo $?` after running the program.
    Here is the code:

    http://codepad.org/UveD3CYu

    (Original post by loulZ)
    I wonder what University teaches C/valgrind -- /me would like to attend
    University of Buenos Aires
    Offline

    0
    ReputationRep:
    (Original post by Miss Mary)
    Here is the code:

    http://codepad.org/UveD3CYu



    University of Buenos Aires
    Too far! Share your header lista.h
    • Thread Starter
    Offline

    2
    ReputationRep:
    (Original post by loulZ)
    Too far! Share your header lista.h
    Here: http://codepad.org/I9d6hkG6
 
 
 
Reply
Submit reply
TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

Updated: October 2, 2010
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • Poll
    Would you rather give up salt or pepper?
    Useful resources
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

    Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

    Write a reply...
    Reply
    Hide
    Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.