libgcrypt hosts its code at git://

You can learn more at the project's web page.

Launchpad imports the master branch and you can create branches from it.

You can browse the source code for the development focus branch or get a copy of the branch using the command:
bzr branch lp:libgcrypt

There are download files available for libgcrypt.

libgcrypt has 1 active branch owned by 1 team. There were 0 commits in the last month.

Bazaar branches

Name Status Last Modified Last Commit
Series: trunk
1 Development 2013-10-02 17:47:56 UTC 2013-10-02
1447. Prevent tail call optimization with _...

Author: Jussi Kivilinna
Revision Date: 2013-10-02 17:47:56 UTC

Prevent tail call optimization with _gcry_burn_stack

* src/g10lib.h (_gcry_burn_stack): Rename to __gcry_burn_stack.
(__gcry_burn_stack_dummy): New.
(_gcry_burn_stack): New macro.
* src/misc.c (_gcry_burn_stack): Rename to __gcry_burn_stack.
(__gcry_burn_stack_dummy): New.

Tail call optimization can turn _gcry_burn_stack call in to tail jump. When
this happens, stack pointer is restored to initial state of current function.
This causes problem for _gcry_burn_stack because its callers do not count in
current function stack depth.

One solution is to prevent gcry_burn_stack being tail optimized by inserting
dummy function call behind it. Another would be to add memory barrier 'asm
volatile("":::"memory")' behind every _gcry_burn_stack call. This however
requires GCC asm support from compiler.

Patch adds detection for memory barrier support and when available uses
memory barrier to prevent when tail call optimization. If not available
dummy function call is used instead.

Signed-off-by: Jussi Kivilinna <>

11 of 1 result
You can't create new branches for libgcrypt.