Bug 31587

Summary: strange segfault in vgFinish
Product: Mesa Reporter: Luca Barbato <lu_zero>
Component: OtherAssignee: mesa-dev
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Luca Barbato 2010-11-12 10:08:26 UTC
Running the cairo-vg tests.

Program received signal SIGSEGV, Segmentation fault.
__pthread_mutex_lock (mutex=0x8) at pthread_mutex_lock.c:50
50	pthread_mutex_lock.c: No such file or directory.
	in pthread_mutex_lock.c
(gdb) bt
#0  __pthread_mutex_lock (mutex=0x8) at pthread_mutex_lock.c:50
#1  0x00002aaaae3663d3 in lp_fence_wait (f=0x0) at lp_fence.c:116
#2  0x00002aaaae3583bc in llvmpipe_fence_finish (screen=<value optimized out>, 
    fence_handle=0x0, flag=0) at lp_screen.c:363
#3  0x00002aaaaf7b6ddf in vegaFinish () at api_context.c:77
#4  0x00002aaaaad3f7d3 in _vg_get_image (surface=0x74f830, 
    x=<value optimized out>, y=<value optimized out>, width=1000, height=800, 
    image_out=0x7fffffffabd8) at cairo-vg-surface.c:1407
#5  0x00002aaaaad175d7 in _cairo_surface_acquire_dest_image (surface=0x8, 
    interest_rect=0x0, image_out=0x7fffffffabd8, image_rect=0x2aaaae94700b, 
    image_extra=0x74fa50) at cairo-surface.c:1519
#6  0x00002aaaaad1982d in _fallback_init (state=0x7fffffffabc0, dst=0x8, 
    x=<value optimized out>, y=<value optimized out>, 
    width=<value optimized out>, height=3145728) at cairo-surface-fallback.c:86
#7  0x00002aaaaad19b7b in _cairo_surface_fallback_fill_rectangles (
    surface=<value optimized out>, op=CAIRO_OPERATOR_CLEAR, 
    color=0x2aaaaad58b40, rects=0x7fffffffac90, num_rects=1)
    at cairo-surface-fallback.c:1488
#8  0x00002aaaaad16bf1 in _cairo_surface_fill_rectangles (surface=0x74f830, 
    op=CAIRO_OPERATOR_CLEAR, color=0x2aaaaad58b40, rects=0x7fffffffac90, 
    num_rects=1) at cairo-surface.c:1966
#9  0x00002aaaaad16e20 in _cairo_surface_fill_region (surface=0x74f830, 
---Type <return> to continue, or q <return> to quit---
    op=CAIRO_OPERATOR_CLEAR, color=0x2aaaaad58b40, 
    region=<value optimized out>) at cairo-surface.c:1916
#10 0x00002aaaaad1b4c7 in _clip_and_composite_region (src=0x2aaaaad5be20, 
    op=CAIRO_OPERATOR_CLEAR, dst=0x74f830, traps=0x7fffffffb670, 
    antialias=<value optimized out>, clip=0x0, extents=0x7fffffffbd90)
    at cairo-surface-fallback.c:617
#11 _clip_and_composite_trapezoids (src=0x2aaaaad5be20, 
    op=CAIRO_OPERATOR_CLEAR, dst=0x74f830, traps=0x7fffffffb670, 
    antialias=<value optimized out>, clip=0x0, extents=0x7fffffffbd90)
    at cairo-surface-fallback.c:846
#12 0x00002aaaaad1bfc5 in _cairo_surface_fallback_paint (surface=0x74f830, 
    op=CAIRO_OPERATOR_CLEAR, source=0x2aaaaad5be20, clip=0x0)
    at cairo-surface-fallback.c:935
#13 0x00002aaaaad18aa1 in _cairo_surface_paint (surface=0x74f830, 
    op=CAIRO_OPERATOR_CLEAR, source=0x2aaaaad5be20, clip=0x0)
    at cairo-surface.c:2028
#14 0x00002aaaaacef512 in _cairo_gstate_paint (gstate=0x2aaaaaf7a9c8)
    at cairo-gstate.c:1049
#15 0x00002aaaaace60b4 in *INT_cairo_paint (cr=0x2aaaaaf7a800) at cairo.c:2232
#16 0x000000000040b0d4 in cairo_test_for_target (ctx=0x7fffffffd790, 
    target=0x663be0, dev_offset=<value optimized out>, 
    similar=<value optimized out>) at cairo-test.c:970
---Type <return> to continue, or q <return> to quit---
#17 0x000000000040c927 in _cairo_test_context_run_for_target (
    ctx=<value optimized out>, target=<value optimized out>, 
    similar=<value optimized out>, dev_offset=<value optimized out>)
    at cairo-test.c:1617
#18 0x000000000040dd99 in _cairo_test_runner_draw (argc=<value optimized out>, 
    argv=<value optimized out>) at cairo-test-runner.c:269
#19 main (argc=<value optimized out>, argv=<value optimized out>)
    at cairo-test-runner.c:924
Comment 1 Chia-I Wu 2010-11-17 19:59:39 UTC
(In reply to comment #0)
> Running the cairo-vg tests.
> 
> Program received signal SIGSEGV, Segmentation fault.
> __pthread_mutex_lock (mutex=0x8) at pthread_mutex_lock.c:50
> 50    pthread_mutex_lock.c: No such file or directory.
>     in pthread_mutex_lock.c
> (gdb) bt
> #0  __pthread_mutex_lock (mutex=0x8) at pthread_mutex_lock.c:50
> #1  0x00002aaaae3663d3 in lp_fence_wait (f=0x0) at lp_fence.c:116
> #2  0x00002aaaae3583bc in llvmpipe_fence_finish (screen=<value optimized out>, 
>     fence_handle=0x0, flag=0) at lp_screen.c:363
cc5c908d7deab59f3512e1a5762fd058c4ae5940 should fix the NULL pointer dereference here.  Could you try again?
> #3  0x00002aaaaf7b6ddf in vegaFinish () at api_context.c:77
> #4  0x00002aaaaad3f7d3 in _vg_get_image (surface=0x74f830, 
>     x=<value optimized out>, y=<value optimized out>, width=1000, height=800, 
>     image_out=0x7fffffffabd8) at cairo-vg-surface.c:1407
> #5  0x00002aaaaad175d7 in _cairo_surface_acquire_dest_image (surface=0x8, 
>     interest_rect=0x0, image_out=0x7fffffffabd8, image_rect=0x2aaaae94700b, 
>     image_extra=0x74fa50) at cairo-surface.c:1519
> #6  0x00002aaaaad1982d in _fallback_init (state=0x7fffffffabc0, dst=0x8, 
>     x=<value optimized out>, y=<value optimized out>, 
>     width=<value optimized out>, height=3145728) at cairo-surface-fallback.c:86
> #7  0x00002aaaaad19b7b in _cairo_surface_fallback_fill_rectangles (
>     surface=<value optimized out>, op=CAIRO_OPERATOR_CLEAR, 
>     color=0x2aaaaad58b40, rects=0x7fffffffac90, num_rects=1)
>     at cairo-surface-fallback.c:1488
> #8  0x00002aaaaad16bf1 in _cairo_surface_fill_rectangles (surface=0x74f830, 
>     op=CAIRO_OPERATOR_CLEAR, color=0x2aaaaad58b40, rects=0x7fffffffac90, 
>     num_rects=1) at cairo-surface.c:1966
> #9  0x00002aaaaad16e20 in _cairo_surface_fill_region (surface=0x74f830, 
> ---Type <return> to continue, or q <return> to quit---
>     op=CAIRO_OPERATOR_CLEAR, color=0x2aaaaad58b40, 
>     region=<value optimized out>) at cairo-surface.c:1916
> #10 0x00002aaaaad1b4c7 in _clip_and_composite_region (src=0x2aaaaad5be20, 
>     op=CAIRO_OPERATOR_CLEAR, dst=0x74f830, traps=0x7fffffffb670, 
>     antialias=<value optimized out>, clip=0x0, extents=0x7fffffffbd90)
>     at cairo-surface-fallback.c:617
> #11 _clip_and_composite_trapezoids (src=0x2aaaaad5be20, 
>     op=CAIRO_OPERATOR_CLEAR, dst=0x74f830, traps=0x7fffffffb670, 
>     antialias=<value optimized out>, clip=0x0, extents=0x7fffffffbd90)
>     at cairo-surface-fallback.c:846
> #12 0x00002aaaaad1bfc5 in _cairo_surface_fallback_paint (surface=0x74f830, 
>     op=CAIRO_OPERATOR_CLEAR, source=0x2aaaaad5be20, clip=0x0)
>     at cairo-surface-fallback.c:935
> #13 0x00002aaaaad18aa1 in _cairo_surface_paint (surface=0x74f830, 
>     op=CAIRO_OPERATOR_CLEAR, source=0x2aaaaad5be20, clip=0x0)
>     at cairo-surface.c:2028
> #14 0x00002aaaaacef512 in _cairo_gstate_paint (gstate=0x2aaaaaf7a9c8)
>     at cairo-gstate.c:1049
> #15 0x00002aaaaace60b4 in *INT_cairo_paint (cr=0x2aaaaaf7a800) at cairo.c:2232
> #16 0x000000000040b0d4 in cairo_test_for_target (ctx=0x7fffffffd790, 
>     target=0x663be0, dev_offset=<value optimized out>, 
>     similar=<value optimized out>) at cairo-test.c:970
> ---Type <return> to continue, or q <return> to quit---
> #17 0x000000000040c927 in _cairo_test_context_run_for_target (
>     ctx=<value optimized out>, target=<value optimized out>, 
>     similar=<value optimized out>, dev_offset=<value optimized out>)
>     at cairo-test.c:1617
> #18 0x000000000040dd99 in _cairo_test_runner_draw (argc=<value optimized out>, 
>     argv=<value optimized out>) at cairo-test-runner.c:269
> #19 main (argc=<value optimized out>, argv=<value optimized out>)
>     at cairo-test-runner.c:924
Comment 2 Luca Barbato 2010-11-20 04:38:46 UTC
I got a FPE a little further, this time in vgDrawPath. Still null pointers

Program received signal SIGFPE, Arithmetic exception.
0x00002aaaaeac6e5b in llvm::LiveIntervals::addIntervalsForSpills(llvm::LiveInterval const&, llvm::SmallVectorImpl<llvm::LiveInterval*>&, llvm::MachineLoopInfo const*, llvm::VirtRegMap&) () from /usr/lib64/egl/pipe_swrast.so
(gdb) bt
#0  0x00002aaaaeac6e5b in llvm::LiveIntervals::addIntervalsForSpills(llvm::LiveInterval const&, llvm::SmallVectorImpl<llvm::LiveInterval*>&, llvm::MachineLoopInfo const*, llvm::VirtRegMap&) () from /usr/lib64/egl/pipe_swrast.so
#1  0x00002aaaaea69088 in (anonymous namespace)::StandardSpiller::spill(llvm::LiveInterval*, llvm::SmallVectorImpl<llvm::LiveInterval*>&, llvm::SlotIndex*)
    () from /usr/lib64/egl/pipe_swrast.so
#2  0x00002aaaaea3bbd2 in (anonymous namespace)::RALinScan::assignRegOrStackSlotAtInterval(llvm::LiveInterval*) () from /usr/lib64/egl/pipe_swrast.so
#3  0x00002aaaaea3dd60 in (anonymous namespace)::RALinScan::linearScan() ()
   from /usr/lib64/egl/pipe_swrast.so
#4  0x00002aaaaea3eb48 in (anonymous namespace)::RALinScan::runOnMachineFunction(llvm::MachineFunction&) () from /usr/lib64/egl/pipe_swrast.so
#5  0x00002aaaaecf831c in llvm::FPPassManager::runOnFunction(llvm::Function&)
    () from /usr/lib64/egl/pipe_swrast.so
#6  0x00002aaaaecf84b4 in llvm::FunctionPassManagerImpl::run(llvm::Function&)
    () from /usr/lib64/egl/pipe_swrast.so
#7  0x00002aaaaecf86ae in llvm::FunctionPassManager::run(llvm::Function&) ()
   from /usr/lib64/egl/pipe_swrast.so
#8  0x00002aaaae9cb0ac in llvm::JIT::runJITOnFunctionUnlocked(llvm::Function*, llvm::MutexGuard const&) () from /usr/lib64/egl/pipe_swrast.so
#9  0x00002aaaae9cb474 in llvm::JIT::getPointerToFunction(llvm::Function*) ()
   from /usr/lib64/egl/pipe_swrast.so
---Type <return> to continue, or q <return> to quit---
#10 0x00002aaaae9e3f56 in llvm::ExecutionEngine::getPointerToGlobal(llvm::GlobalValue const*) () from /usr/lib64/egl/pipe_swrast.so
#11 0x00002aaaae7d3172 in draw_llvm_generate (llvm=<value optimized out>, 
    variant=<value optimized out>) at draw/draw_llvm.c:1189
#12 0x00002aaaae7d3a50 in draw_llvm_create_variant (llvm=0x705070, 
    num_inputs=<value optimized out>, key=0x7fffffffb710)
    at draw/draw_llvm.c:326
#13 0x00002aaaae7d5683 in llvm_middle_end_prepare (middle=0x71efe0, 
    in_prim=<value optimized out>, opt=<value optimized out>, 
    max_vertices=<value optimized out>)
    at draw/draw_pt_fetch_shade_pipeline_llvm.c:161
#14 0x00002aaaae7a9745 in vsplit_prepare (frontend=0x71c1d0, in_prim=0, 
    middle=0x7dc210, opt=0) at draw/draw_pt_vsplit.c:170
#15 0x00002aaaae7a588b in draw_pt_arrays (draw=<value optimized out>, prim=6, 
    start=0, count=4) at draw/draw_pt.c:111
#16 0x00002aaaae7a5a6d in draw_vbo (draw=0x703f10, info=0x7fffffffbaf0)
    at draw/draw_pt.c:481
#17 0x00002aaaae784350 in llvmpipe_draw_vbo (pipe=0x702fa0, 
    info=0x7fffffffbaf0) at lp_draw_arrays.c:81
#18 0x00002aaaafc0680a in util_draw_arrays (pipe=0x702fa0, 
    vbuf=<value optimized out>, offset=<value optimized out>, prim_type=6, 
    num_verts=4, num_attribs=<value optimized out>) at ./util/u_draw.h:58
---Type <return> to continue, or q <return> to quit---
#19 util_draw_vertex_buffer (pipe=0x702fa0, vbuf=<value optimized out>, 
    offset=<value optimized out>, prim_type=6, num_verts=4, 
    num_attribs=<value optimized out>) at util/u_draw_quad.c:63
#20 0x00002aaaafbf54a6 in renderer_draw_quad (r=0x74dfc0, 
    x1=<value optimized out>, y1=<value optimized out>, 
    x2=<value optimized out>, y2=<value optimized out>, 
    depth=<value optimized out>) at renderer.c:217
#21 0x00002aaaafbc0b77 in surface_fill (x=<value optimized out>, 
    y=<value optimized out>, width=<value optimized out>, 
    height=<value optimized out>, value=<value optimized out>) at mask.c:392
#22 mask_fill (x=<value optimized out>, y=<value optimized out>, 
    width=<value optimized out>, height=<value optimized out>, 
    value=<value optimized out>) at mask.c:678
#23 0x00002aaaafbc05f1 in setup_new_alpha_mask (ctx=0x74ae70)
    at vg_manager.c:123
#24 vg_context_update_draw_buffer (ctx=0x74ae70) at vg_manager.c:258
#25 vg_manager_validate_framebuffer (ctx=0x74ae70) at vg_manager.c:313
#26 0x00002aaaafbdd2f4 in vg_validate_state (ctx=0x6bda50) at vg_context.c:345
#27 0x00002aaaafbed408 in path_render (p=0x753650, paintModes=2)
    at path.c:1527
#28 0x00002aaaaad4fab5 in _vg_surface_paint (abstract_surface=0x752880, 
    op=<value optimized out>, source=<value optimized out>, clip=0x0)
---Type <return> to continue, or q <return> to quit---
    at cairo-vg-surface.c:1259
#29 0x00002aaaaad19f57 in _cairo_surface_paint (surface=0x752880, 
    op=CAIRO_OPERATOR_OVER, source=0x7fffffffbe40, clip=0x0)
    at cairo-surface.c:2023
#30 0x00002aaaaacf0a42 in _cairo_gstate_paint (gstate=0x2aaaaaf8db28)
    at cairo-gstate.c:1049
#31 0x00002aaaaace75e4 in *INT_cairo_paint (cr=0x2aaaaaf8d960) at cairo.c:2232
#32 0x000000000040f2e4 in draw (cr=0x2aaaaaf8d960, 
    width=<value optimized out>, height=<value optimized out>) at a1-bug.c:41
#33 0x000000000040bbb3 in cairo_test_for_target (ctx=0x7fffffffd7a0, 
    target=0x666bc0, dev_offset=<value optimized out>, 
    similar=<value optimized out>) at cairo-test.c:984
#34 0x000000000040d387 in _cairo_test_context_run_for_target (
    ctx=<value optimized out>, target=<value optimized out>, 
    similar=<value optimized out>, dev_offset=<value optimized out>)
    at cairo-test.c:1617
#35 0x000000000040e7f9 in _cairo_test_runner_draw (
    argc=<value optimized out>, argv=<value optimized out>)
    at cairo-test-runner.c:269
#36 main (argc=<value optimized out>, argv=<value optimized out>)
    at cairo-test-runner.c:924
(gdb) bt
#0  0x00002aaaaeac6e5b in llvm::LiveIntervals::addIntervalsForSpills(llvm::LiveInterval const&, llvm::SmallVectorImpl<llvm::LiveInterval*>&, llvm::MachineLoopInfo const*, llvm::VirtRegMap&) () from /usr/lib64/egl/pipe_swrast.so
#1  0x00002aaaaea69088 in (anonymous namespace)::StandardSpiller::spill(llvm::LiveInterval*, llvm::SmallVectorImpl<llvm::LiveInterval*>&, llvm::SlotIndex*)
    () from /usr/lib64/egl/pipe_swrast.so
#2  0x00002aaaaea3bbd2 in (anonymous namespace)::RALinScan::assignRegOrStackSlotAtInterval(llvm::LiveInterval*) () from /usr/lib64/egl/pipe_swrast.so
#3  0x00002aaaaea3dd60 in (anonymous namespace)::RALinScan::linearScan() ()
   from /usr/lib64/egl/pipe_swrast.so
#4  0x00002aaaaea3eb48 in (anonymous namespace)::RALinScan::runOnMachineFunction(llvm::MachineFunction&) () from /usr/lib64/egl/pipe_swrast.so
#5  0x00002aaaaecf831c in llvm::FPPassManager::runOnFunction(llvm::Function&)
    () from /usr/lib64/egl/pipe_swrast.so
#6  0x00002aaaaecf84b4 in llvm::FunctionPassManagerImpl::run(llvm::Function&)
    () from /usr/lib64/egl/pipe_swrast.so
#7  0x00002aaaaecf86ae in llvm::FunctionPassManager::run(llvm::Function&) ()
   from /usr/lib64/egl/pipe_swrast.so
#8  0x00002aaaae9cb0ac in llvm::JIT::runJITOnFunctionUnlocked(llvm::Function*, llvm::MutexGuard const&) () from /usr/lib64/egl/pipe_swrast.so
#9  0x00002aaaae9cb474 in llvm::JIT::getPointerToFunction(llvm::Function*) ()
   from /usr/lib64/egl/pipe_swrast.so
---Type <return> to continue, or q <return> to quit---
#10 0x00002aaaae9e3f56 in llvm::ExecutionEngine::getPointerToGlobal(llvm::GlobalValue const*) () from /usr/lib64/egl/pipe_swrast.so
#11 0x00002aaaae7d3172 in draw_llvm_generate (llvm=<value optimized out>, 
    variant=<value optimized out>) at draw/draw_llvm.c:1189
#12 0x00002aaaae7d3a50 in draw_llvm_create_variant (llvm=0x705070, 
    num_inputs=<value optimized out>, key=0x7fffffffb710)
    at draw/draw_llvm.c:326
#13 0x00002aaaae7d5683 in llvm_middle_end_prepare (middle=0x71efe0, 
    in_prim=<value optimized out>, opt=<value optimized out>, 
    max_vertices=<value optimized out>)
    at draw/draw_pt_fetch_shade_pipeline_llvm.c:161
#14 0x00002aaaae7a9745 in vsplit_prepare (frontend=0x71c1d0, in_prim=0, 
    middle=0x7dc210, opt=0) at draw/draw_pt_vsplit.c:170
#15 0x00002aaaae7a588b in draw_pt_arrays (draw=<value optimized out>, prim=6, 
    start=0, count=4) at draw/draw_pt.c:111
#16 0x00002aaaae7a5a6d in draw_vbo (draw=0x703f10, info=0x7fffffffbaf0)
    at draw/draw_pt.c:481
#17 0x00002aaaae784350 in llvmpipe_draw_vbo (pipe=0x702fa0, 
    info=0x7fffffffbaf0) at lp_draw_arrays.c:81
#18 0x00002aaaafc0680a in util_draw_arrays (pipe=0x702fa0, 
    vbuf=<value optimized out>, offset=<value optimized out>, prim_type=6, 
    num_verts=4, num_attribs=<value optimized out>) at ./util/u_draw.h:58
---Type <return> to continue, or q <return> to quit---
#19 util_draw_vertex_buffer (pipe=0x702fa0, vbuf=<value optimized out>, 
    offset=<value optimized out>, prim_type=6, num_verts=4, 
    num_attribs=<value optimized out>) at util/u_draw_quad.c:63
#20 0x00002aaaafbf54a6 in renderer_draw_quad (r=0x74dfc0, 
    x1=<value optimized out>, y1=<value optimized out>, 
    x2=<value optimized out>, y2=<value optimized out>, 
    depth=<value optimized out>) at renderer.c:217
#21 0x00002aaaafbc0b77 in surface_fill (x=<value optimized out>, 
    y=<value optimized out>, width=<value optimized out>, 
    height=<value optimized out>, value=<value optimized out>) at mask.c:392
#22 mask_fill (x=<value optimized out>, y=<value optimized out>, 
    width=<value optimized out>, height=<value optimized out>, 
    value=<value optimized out>) at mask.c:678
#23 0x00002aaaafbc05f1 in setup_new_alpha_mask (ctx=0x74ae70)
    at vg_manager.c:123
#24 vg_context_update_draw_buffer (ctx=0x74ae70) at vg_manager.c:258
#25 vg_manager_validate_framebuffer (ctx=0x74ae70) at vg_manager.c:313
#26 0x00002aaaafbdd2f4 in vg_validate_state (ctx=0x6bda50) at vg_context.c:345
#27 0x00002aaaafbed408 in path_render (p=0x753650, paintModes=2)
    at path.c:1527
#28 0x00002aaaaad4fab5 in _vg_surface_paint (abstract_surface=0x752880, 
    op=<value optimized out>, source=<value optimized out>, clip=0x0)

(gdb) frame 11
#11 0x00002aaaae7d3172 in draw_llvm_generate (llvm=<value optimized out>, 
    variant=<value optimized out>) at draw/draw_llvm.c:1189
1189	   code = LLVMGetPointerToGlobal(llvm->draw->engine, variant->function);
(gdb) list
1184	   if (gallivm_debug & GALLIVM_DEBUG_IR) {
1185	      lp_debug_dump_value(variant->function);
1186	      debug_printf("\n");
1187	   }
1188	
1189	   code = LLVMGetPointerToGlobal(llvm->draw->engine, variant->function);
1190	   variant->jit_func = (draw_jit_vert_func)pointer_to_func(code);
1191	
1192	   if (gallivm_debug & GALLIVM_DEBUG_ASM) {
1193	      lp_disassemble(code);

(gdb) frame 12
#12 0x00002aaaae7d3a50 in draw_llvm_create_variant (llvm=0x705070, 
    num_inputs=<value optimized out>, key=0x7fffffffb710)
    at draw/draw_llvm.c:326
326	   draw_llvm_generate(llvm, variant);

(gdb) print *llvm
$12 = {draw = 0x703f10, jit_context = {vs_constants = 0x0, 
    gs_constants = 0x0, planes = 0x0, viewport = 0x0, textures = {{width = 0, 
        height = 0, depth = 0, last_level = 0, row_stride = {
          0 <repeats 16 times>}, img_stride = {0 <repeats 16 times>}, data = {
          0x0 <repeats 16 times>}, min_lod = 0, max_lod = 0, lod_bias = 0, 
        border_color = {0, 0, 0, 0}} <repeats 16 times>}}, 
  vs_variants_list = {base = 0x0, next = 0x706398, prev = 0x706398}, 
  nr_variants = 0, module = 0x6f19e0, engine = 0x693320, provider = 0x6f19e0, 
  target = 0x6909d0, pass = 0x6f38e0, context_ptr_type = 0x715960, 
  vertex_header_ptr_type = 0x7735b0, buffer_ptr_type = 0x715a50, 
  vb_ptr_type = 0x715e50}
(gdb) print *key
$13 = {nr_vertex_elements = 2, nr_samplers = 0, clip_xy = 1, clip_z = 1, 
  clip_user = 0, clip_halfz = 0, bypass_viewport = 0, need_edgeflags = 0, 
  nr_planes = 6, pad = 0, vertex_element = {{src_offset = 0, 
      instance_divisor = 0, vertex_buffer_index = 0, 
      src_format = PIPE_FORMAT_R32G32B32A32_FLOAT}}}
(gdb) print *shader
$14 = {base = {draw = 0x703f10, state = {tokens = 0x756050}, info = {
      num_tokens = 8, num_inputs = 1 '\001', num_outputs = 1 '\001', 
      input_semantic_name = '\000' <repeats 31 times>, 
      input_semantic_index = '\000' <repeats 31 times>, 
      input_interpolate = '\000' <repeats 31 times>, 
      input_centroid = '\000' <repeats 31 times>, 
      input_usage_mask = "\017", '\000' <repeats 30 times>, 
      input_cylindrical_wrap = '\000' <repeats 31 times>, 
      output_semantic_name = '\000' <repeats 31 times>, 
      output_semantic_index = '\000' <repeats 31 times>, file_mask = {0, 3, 
        1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, file_count = {0, 2, 1, 1, 1, 0, 0, 0, 
        0, 0, 0, 0}, file_max = {-1, 1, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1}, 
      immediate_count = 0, num_instructions = 4, opcode_count = {0, 1, 0, 0, 
        0, 0, 0, 1, 1, 0 <repeats 108 times>, 1, 0 <repeats 27 times>}, 
      writes_z = 0 '\000', writes_stencil = 0 '\000', 
      writes_edgeflag = 0 '\000', uses_kill = 0 '\000', indirect_files = 0, 
      properties = {{name = 0, data = {0, 0, 0, 0, 0, 0, 0, 0}}, {name = 0, 
          data = {0, 0, 0, 0, 0, 0, 0, 0}}, {name = 0, data = {0, 0, 0, 0, 0, 
            0, 0, 0}}, {name = 0, data = {0, 0, 0, 0, 0, 0, 0, 0}}, {
          name = 0, data = {0, 0, 0, 0, 0, 0, 0, 0}}}, num_properties = 0}, 
    position_output = 0, edgeflag_output = 0, immediates = 0x0, varient = {
      0x0 <repeats 16 times>}, nr_varients = 0, last_varient = 0, 
---Type <return> to continue, or q <return> to quit---
    create_varient = 0x2aaaae7afc70 <draw_vs_create_varient_generic>, 
    prepare = 0x2aaaae7d4d50 <vs_llvm_prepare>, 
    run_linear = 0x2aaaae7d4d60 <vs_llvm_run_linear>, 
    delete = 0x2aaaae7d4e70 <vs_llvm_delete>}, variant_key_size = 20, 
  variants = {base = 0x0, next = 0x756748, prev = 0x756748}, 
  variants_created = 0, variants_cached = 0}

#28 0x00002aaaaad4fab5 in _vg_surface_paint (abstract_surface=0x752880, 
    op=<value optimized out>, source=<value optimized out>, clip=0x0)
    at cairo-vg-surface.c:1259
1259		vgDrawPath (fullext, VG_FILL_PATH);
(gdb) list
1254	
1255		fullext = vgCreatePath (VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F,
1256					1,0,0,0, VG_PATH_CAPABILITY_ALL);
1257		vgAppendPathData (fullext, sizeof(segs), segs, data);
1258	
1259		vgDrawPath (fullext, VG_FILL_PATH);
1260	
1261		vgDestroyPath (fullext);
1262	    }
Comment 3 Luca Barbato 2010-11-20 05:20:24 UTC
(In reply to comment #2)
> I got a FPE a little further, this time in vgDrawPath. Still null pointers

Switching to llvm 2.8 solved that one. but then there is yet another bug in

#0  0x0000000200000003 in ?? ()
#1  0x00002aaaae839c26 in vs_llvm_delete (dvs=0x75b620)
    at draw/draw_vs_llvm.c:77
#2  0x00002aaaae7e7254 in llvmpipe_delete_vs_state (
    pipe=<value optimized out>, vs=0x757490) at lp_state_vs.c:105
#3  0x00002aaaafcf418c in util_destroy_blit (ctx=0x757160)
    at util/u_blit.c:173
#4  0x00002aaaafcc71a0 in vg_destroy_context (ctx=0x752cf0)
    at vg_context.c:171
#5  0x00002aaaadb44028 in destroy_context (drv=<value optimized out>, 
    dpy=0x671a80, draw=0x863930, read=0x863930, ctx=0x7a5a70)
    at common/egl_g3d_api.c:219
#6  egl_g3d_make_current (drv=<value optimized out>, dpy=0x671a80, 
    draw=0x863930, read=0x863930, ctx=0x7a5a70) at common/egl_g3d_api.c:556
#7  0x00002aaaabb674f9 in eglMakeCurrent (dpy=0x671a80, draw=0x863930, 
    read=0x863930, ctx=0x7a5a70) at eglapi.c:481
#8  0x000000000044b7f5 in _cairo_boilerplate_vg_create_surface_egl (
    name=<value optimized out>, content=CAIRO_CONTENT_COLOR_ALPHA, 
    width=<value optimized out>, height=<value optimized out>, 
    max_width=<value optimized out>, max_height=<value optimized out>, 
    mode=<value optimized out>, id=<value optimized out>, 
    closure=0x7fffffffc0a0) at cairo-boilerplate-vg.c:272


Looks like the cairo test might be a goldmine =) should I open another bug or change the bug title?
Comment 4 Chia-I Wu 2010-11-21 05:06:31 UTC
That would be great.  Can you also provide the instructions to run cairo tests with OpenVG backend, or even better, a simpler test case that demonstrate the issue(s).
Comment 5 Timothy Arceri 2016-01-27 11:55:11 UTC
The OpenVG state tracker has been removed from Mesa. Closing issue.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.