Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b580c1aeca
Fetching contributors…

Cannot retrieve contributors at this time

file 26 lines (19 sloc) 0.263 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#include <stdio.h>
#include <stdlib.h>

#include "stacktrace.hpp"

void g()
{
    Teuchos::show_stacktrace();
}

void f()
{
    g();
}

int main()
{
    f();

    Teuchos::print_stack_on_segfault();

    // This will segfault:
    char *p; *p=0;

    return 0;
}
Something went wrong with that request. Please try again.