Thread: Problem with libgcrypt

  1. #1
    Registered User
    Join Date
    Dec 2012
    Posts
    2

    Problem with libgcrypt

    I made a program with libgcrypt, but when I run I found this

    Ohhhh jeeee: ... this is a bug (md.c:969:md_read)
    Aborted (core dumped)

    Anybody can help me.
    Thanks

  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
    Post the code where you call that function.

    Passing garbage pointers to a function will make it crash in that function.
    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
    Registered User
    Join Date
    Dec 2012
    Posts
    2
    Hi Salem! Can you give me your e-mail.
    I will send to you the code. The code is to big and the function is called in many places.
    Thanks for you concern.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    I'd much rather that you:

    a) learn to use a debugger, then you won't have to keep visiting forums every time you have some code crash.
    Peter's gdb Tutorial: Breakpoints And Watchpoints
    Learn a few basic command like
    - set breakpoints (break)
    - print variables (print)
    - step into, over and out of functions (step, next, finish)
    - print call stack (bt)
    - navigate the stack (frame)
    You can get quite a lot done with just those few commands.

    b) if you have a large amount of code, then uploading it to say dropbox to allow more than one person to make a contribution (should they want to). Avoid sites which force signup or bombard you with ads and stupidly long timeouts just to download the file - people will lose interest.

    Also, you need to give CLEAR instructions for building and testing, along with details of any pre-requisite libraries.

    If we have to mess about guessing what libraries to install, how to build it, what the input is (both files, and interactive Q&A), then we'll just give up and you'll still be in the dark.

    Finally, bear in mind that you're asking for free time. Debugging large amounts of unfamiliar code is time consuming, so don't expect people to spend tens of hours on just your problem. The most you could reasonably expect is that some will download, build and run the code (assuming clear instructions). With luck, someone might spot some easy fixes.

    If not, step a) is your only safe long term bet (aside from paying someone to do it for you).
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to decrypt / encrypt using libgcrypt ? (ARC4)
    By jabka in forum C Programming
    Replies: 6
    Last Post: 04-21-2010, 11:34 PM
  2. strcmp problem, whats the problem, i cant figure it out!
    By AvaGodess in forum C Programming
    Replies: 14
    Last Post: 10-18-2008, 06:45 PM
  3. Replies: 4
    Last Post: 10-16-2008, 07:30 PM
  4. Replies: 27
    Last Post: 10-11-2006, 04:27 AM
  5. syntax linked list problem & struct problem
    By beely in forum C Programming
    Replies: 5
    Last Post: 11-11-2002, 09:14 AM