After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 608553 - Regression: Generating catch clauses
Regression: Generating catch clauses
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: general
0.7.x
Other Linux
: High blocker
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-30 20:15 UTC by Sebastian Pölsterl
Modified: 2010-02-04 19:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case (868 bytes, text/plain)
2010-01-30 20:25 UTC, Sebastian Pölsterl
Details

Description Sebastian Pölsterl 2010-01-30 20:15:39 UTC
The following commit causes an regression:

commit 70481713241901c1dd592d5295bc1061a72ca59a
Author: Jürg Billeter <j@bitron.ch>
Date:   Wed Jan 27 18:30:08 2010 +0100

    Distinguish between unhandled and unexpected errors
    
    This fixes C warnings due to unexpected error handling.


valac shows a critical warning:
** (valac:27502): CRITICAL **: vala_ccode_fragment_append: assertion `node != NULL' failed

  • #0 *__GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #1 *__GI_abort
    at abort.c line 92
  • #2 IA__g_logv
    at /build/buildd/glib2.0-2.22.3/glib/gmessages.c line 549
  • #3 IA__g_log
    at /build/buildd/glib2.0-2.22.3/glib/gmessages.c line 569
  • #4 vala_gerror_module_real_append_local_free
    at valagerrormodule.c line 1330
  • #5 vala_ccode_base_module_real_append_local_free
    at valaccodebasemodule.c line 7066
  • #6 vala_gerror_module_uncaught_error_statement
    at valagerrormodule.c line 794
  • #7 vala_gerror_module_real_add_simple_check
    at valagerrormodule.c line 1031
  • #8 vala_ccode_base_module_real_visit_expression_statement
    at valaccodebasemodule.c line 6903
  • #9 vala_block_real_accept_children
    at valablock.c line 1453
  • #10 vala_ccode_base_module_real_visit_block
    at valaccodebasemodule.c line 3815
  • #11 vala_gerror_module_real_visit_try_statement
    at valagerrormodule.c line 1161
  • #12 vala_block_real_accept_children
    at valablock.c line 1453
  • #13 vala_ccode_base_module_real_visit_block
    at valaccodebasemodule.c line 3815
  • #14 vala_gerror_module_real_visit_try_statement
    at valagerrormodule.c line 1158
  • #15 vala_block_real_accept_children
    at valablock.c line 1453
  • #16 vala_ccode_base_module_real_visit_block
    at valaccodebasemodule.c line 3815
  • #17 vala_ccode_method_module_real_visit_method
    at valaccodemethodmodule.c line 1093
  • #18 vala_class_real_accept_children
    at valaclass.c line 1141
  • #19 vala_gtype_module_real_visit_class
    at valagtypemodule.c line 1816
  • #20 vala_gobject_module_real_visit_class
    at valagobjectmodule.c line 634
  • #21 vala_source_file_accept_children
    at valasourcefile.c line 351
  • #22 vala_ccode_base_module_real_visit_source_file
    at valaccodebasemodule.c line 1225
  • #23 vala_ccode_base_module_real_emit
    at valaccodebasemodule.c line 838
  • #24 vala_ccode_generator_real_emit
    at valaccodegenerator.c line 435
  • #25 vala_compiler_run
    at valacompiler.c line 762
  • #26 vala_compiler_main
    at valacompiler.c line 1138
  • #27 __libc_start_main
    at libc-start.c line 220
  • #28 _start
    at ../sysdeps/x86_64/elf/start.S line 113


The generated C code contains errors:

src/RecordingsStore.c: In function ‘dvb_recordings_store_restore_from_dir’:
src/RecordingsStore.c:899: error: duplicate label ‘__catch45_g_error’
src/RecordingsStore.c:830: note: previous definition of ‘__catch45_g_error’ was here
src/RecordingsStore.c:909: error: duplicate label ‘__finally45’
src/RecordingsStore.c:840: note: previous definition of ‘__finally45’ was here
src/RecordingsStore.c:965: error: duplicate label ‘__catch45_g_error’
src/RecordingsStore.c:830: note: previous definition of ‘__catch45_g_error’ was here
src/RecordingsStore.c:975: error: duplicate label ‘__finally45’
src/RecordingsStore.c:840: note: previous definition of ‘__finally45’ was here
src/RecordingsStore.c:1048: error: duplicate label ‘__catch45_g_error’
src/RecordingsStore.c:830: note: previous definition of ‘__catch45_g_error’ was here
src/RecordingsStore.c:1058: error: duplicate label ‘__finally45’
src/RecordingsStore.c:840: note: previous definition of ‘__finally45’ was here
Comment 1 Sebastian Pölsterl 2010-01-30 20:25:50 UTC
Created attachment 152646 [details]
Test case

Here is a smaller test case with backtrace:

  • #0 *__GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #1 *__GI_abort
    at abort.c line 92
  • #2 IA__g_logv
    at /build/buildd/glib2.0-2.22.3/glib/gmessages.c line 549
  • #3 IA__g_log
    at /build/buildd/glib2.0-2.22.3/glib/gmessages.c line 569
  • #4 vala_gerror_module_real_append_local_free
    at valagerrormodule.c line 1330
  • #5 vala_ccode_base_module_real_append_local_free
    at valaccodebasemodule.c line 7066
  • #6 vala_gerror_module_uncaught_error_statement
    at valagerrormodule.c line 794
  • #7 vala_gerror_module_real_add_simple_check
    at valagerrormodule.c line 1031
  • #8 vala_ccode_base_module_real_visit_expression_statement
    at valaccodebasemodule.c line 6903
  • #9 vala_block_real_accept_children
    at valablock.c line 1453
  • #10 vala_ccode_base_module_real_visit_block
    at valaccodebasemodule.c line 3815
  • #11 vala_gerror_module_real_visit_try_statement
    at valagerrormodule.c line 1161
  • #12 vala_block_real_accept_children
    at valablock.c line 1453
  • #13 vala_ccode_base_module_real_visit_block
    at valaccodebasemodule.c line 3815
  • #14 vala_gerror_module_real_visit_try_statement
    at valagerrormodule.c line 1158
  • #15 vala_block_real_accept_children
    at valablock.c line 1453
  • #16 vala_ccode_base_module_real_visit_block
    at valaccodebasemodule.c line 3815
  • #17 vala_ccode_method_module_real_visit_method
    at valaccodemethodmodule.c line 1093
  • #18 vala_source_file_accept_children
    at valasourcefile.c line 351
  • #19 vala_ccode_base_module_real_visit_source_file
    at valaccodebasemodule.c line 1225
  • #20 vala_ccode_base_module_real_emit
    at valaccodebasemodule.c line 838
  • #21 vala_ccode_generator_real_emit
    at valaccodegenerator.c line 435
  • #22 vala_compiler_run
    at valacompiler.c line 762
  • #23 vala_compiler_main
    at valacompiler.c line 1138
  • #24 __libc_start_main
    at libc-start.c line 220
  • #25 _start
    at ../sysdeps/x86_64/elf/start.S line 113
  • #0 *__GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #1 *__GI_abort
    at abort.c line 92
  • #2 IA__g_logv
    at /build/buildd/glib2.0-2.22.3/glib/gmessages.c line 549
  • #3 IA__g_log
    at /build/buildd/glib2.0-2.22.3/glib/gmessages.c line 569
  • #4 vala_gerror_module_real_append_local_free
    at valagerrormodule.c line 1330
  • #5 vala_ccode_base_module_real_append_local_free
    at valaccodebasemodule.c line 7066
  • #6 vala_gerror_module_uncaught_error_statement
    at valagerrormodule.c line 794
  • #7 vala_gerror_module_real_add_simple_check
    at valagerrormodule.c line 1031
  • #8 vala_ccode_base_module_real_visit_expression_statement
    at valaccodebasemodule.c line 6903
  • #9 vala_block_real_accept_children
    at valablock.c line 1453
  • #10 vala_ccode_base_module_real_visit_block
    at valaccodebasemodule.c line 3815
  • #11 vala_gerror_module_real_visit_try_statement
    at valagerrormodule.c line 1161
  • #12 vala_block_real_accept_children
    at valablock.c line 1453
  • #13 vala_ccode_base_module_real_visit_block
    at valaccodebasemodule.c line 3815
  • #14 vala_gerror_module_real_visit_try_statement
    at valagerrormodule.c line 1158
  • #15 vala_block_real_accept_children
    at valablock.c line 1453
  • #16 vala_ccode_base_module_real_visit_block
    at valaccodebasemodule.c line 3815
  • #17 vala_ccode_method_module_real_visit_method
    at valaccodemethodmodule.c line 1093
  • #18 vala_source_file_accept_children
    at valasourcefile.c line 351
  • #19 vala_ccode_base_module_real_visit_source_file
    at valaccodebasemodule.c line 1225
  • #20 vala_ccode_base_module_real_emit
    at valaccodebasemodule.c line 838
  • #21 vala_ccode_generator_real_emit
    at valaccodegenerator.c line 435
  • #22 vala_compiler_run
    at valacompiler.c line 762
  • #23 vala_compiler_main
    at valacompiler.c line 1138
  • #24 __libc_start_main
    at libc-start.c line 220
  • #25 _start
    at ../sysdeps/x86_64/elf/start.S line 113

Comment 2 Jürg Billeter 2010-02-04 19:56:37 UTC
commit 7df672793c8305535c3f159af77041d9d64b801a
Author: Jürg Billeter <j@bitron.ch>
Date:   Thu Feb 4 20:55:16 2010 +0100

    Do not check unexpected errors if there is a general catch clause
    
    Fixes bug 608553.