Permalink
Switch branches/tags
Commits on Dec 12, 2012
  1. added ChangeLog line for native_attrs

    Reini Urban committed Dec 12, 2012
  2. make bootstrap-ops for native_attrs

    Reini Urban committed Dec 12, 2012
    This needs to bump PBC_COMPAT if applied after 4.11.0
    op_count went from 1129 to 1165
  3. add native get/setattributes to ops

    Reini Urban committed Dec 12, 2012
    This is a rebase of the branch whiteknight/native_attrs.
    Add in getattribute and setattribute variants for native types.
    Right now they do the same boxing/unboxing, but in the future they might be replaced
    with real native attribute access.
  4. [cage] fix wrong UNUSED(INTERP) in core.ops,experimental.ops

    Reini Urban committed Dec 12, 2012
    This came up when doing make bootstrap-ops
  5. [codingstd] untabify t/src/embed/api.t [GH #816]

    Reini Urban committed Dec 12, 2012
  6. Improve the name and description of mime_base64.t

    leto committed with Reini Urban Aug 18, 2012
  7. [pmc2c] detect more empty bodies

    Reini Urban committed Dec 12, 2012
  8. Revive ParrotInterpreter.get_integer to return the thread id

    Reini Urban committed Dec 12, 2012
    This was disabled with the kill_threads branch, end of 2011
  9. [doc] mark test_more, Test::Builder as not thread-safe

    Reini Urban committed Dec 12, 2012
    The counter updates need to be schedule_proxied in the parent task
  10. [doc] Update pdd25_concurrency (a bit)

    Reini Urban committed Dec 12, 2012
    Hilight our current hybrid threading model.
    
    Several methods are missing:
    e.g. wait TASK, threaded writes, Task send, invoke,
    pass
  11. Fix a thread race condition in Parrot_alarm_runloop

    Reini Urban committed Dec 12, 2012
    Racy write with read in Parrot_alarm_check, lock alarm_serial += 1;
    
    $ tsan ./parrot t/pmc/task.t
    ok 9 pre-empt and exit
    ==18766== INFO: T0 is program's main thread
    ==18766== INFO: T1 has been created by T0. Use --announce-threads to see the creation stack.
    ==18766== WARNING: Possible data race during write of size 8 at 0x5322580: {{{
    ==18766==    T1 (L{}):
    ==18766==     #0  Parrot_alarm_runloop /usr/src/parrot/master/src/alarm.c:129
    ==18766==   Concurrent read(s) happened at (OR AFTER) these points:
    ==18766==    T0 (L{}):
    ==18766==     #0  Parrot_alarm_check /usr/src/parrot/master/src/alarm.c:154
    ==18766==     #1  Parrot_cx_check_scheduler /usr/src/parrot/master/src/scheduler.c:253
    ==18766==     #2  Parrot_branch_ic /usr/src/parrot/master/src/ops/core_ops.c:13735
    ==18766==     #3  runops_fast_core /usr/src/parrot/master/src/runcore/cores.c:499
    ==18766==     #4  runops_int /usr/src/parrot/master/src/runcore/main.c:220
    ==18766==     #5  runops /usr/src/parrot/master/src/call/ops.c:123
    ==18766==     #6  Parrot_pcc_invoke_from_sig_object /usr/src/parrot/master/src/call/pcc.c:338
    ==18766==     #7  Parrot_ext_call /usr/src/parrot/master/src/extend.c:158
    ==18766==     #8  Parrot_Task_invoke /usr/src/parrot/master/src/pmc/task.c:168
    ==18766==     #9  Parrot_pcc_invoke_from_sig_object /usr/src/parrot/master/src/call/pcc.c:330
    ==18766==   Address 0x5322580 is 0 bytes inside data symbol "alarm_serial"
    ==18766==    Race verifier data: 0x4FEC3AE,0x4FEC3FB
    ==18766== }}}
  12. Fix a threads race condition with Task_nci_send/Task_invoke

    Reini Urban committed Dec 12, 2012
    Postpone TASK_recv_block_CLEAR(partner) when another task wants to check
    !TASK_in_preempt_TEST(_self)
    
    $ tsan ./parrot t/pmc/task.t
    ==6406== ThreadSanitizer, a data race detector
    1..8
    ok 1 - initialized
    ok 2 task1 ran
    ok 3 task2 ran
    ok 4 sub1 ran
    ==6406== INFO: T2 has been created by T0. Use --announce-threads to see the creation stack.
    ==6406== INFO: T0 is program's main thread
    ==6406== WARNING: Possible data race during write of size 8 at 0x43A6218: {{{
    ==6406==    T0 (L{L31}):
    ==6406==     #0  Parrot_Task_nci_send /usr/src/parrot/master/src/pmc/task.c:316
    ==6406==     #1  Parrot_NativePCCMethod_invoke /usr/src/parrot/master/src/pmc/nativepccmethod.c:122
    ==6406==     #2  Parrot_callmethodcc_p_sc /usr/src/parrot/master/src/ops/core_ops.c:18300
    ==6406==     #3  runops_fast_core /usr/src/parrot/master/src/runcore/cores.c:499
    ==6406==     #4  runops_int /usr/src/parrot/master/src/runcore/main.c:220
    ==6406==     #5  runops /usr/src/parrot/master/src/call/ops.c:123
    ==6406==     #6  Parrot_pcc_invoke_from_sig_object /usr/src/parrot/master/src/call/pcc.c:338
    ==6406==     #7  Parrot_ext_call /usr/src/parrot/master/src/extend.c:158
    ==6406==     #8  Parrot_Task_invoke /usr/src/parrot/master/src/pmc/task.c:168
    ==6406==     #9  Parrot_pcc_invoke_from_sig_object /usr/src/parrot/master/src/call/pcc.c:330
    ==6406==     #10 Parrot_ext_call /usr/src/parrot/master/src/extend.c:158
    ==6406==     #11 Parrot_cx_next_task /usr/src/parrot/master/src/scheduler.c:231
    ==6406==   Concurrent read(s) happened at (OR AFTER) these points:
    ==6406==    T2 (L{}):
    ==6406==     #0  Parrot_Task_invoke /usr/src/parrot/master/src/pmc/task.c:175
    ==6406==     #1  Parrot_pcc_invoke_from_sig_object /usr/src/parrot/master/src/call/pcc.c:330
    ==6406==     #2  Parrot_ext_call /usr/src/parrot/master/src/extend.c:158
    ==6406==     #3  Parrot_cx_next_task /usr/src/parrot/master/src/scheduler.c:231
    ==6406==     #4  Parrot_thread_outer_runloop /usr/src/parrot/master/src/thread.c:322
    ==6406==   Location 0x43A6218 is 1544 bytes inside a block starting at 0x43A5C10 of size 4096 allocated by T0 from heap:
    ==6406==     #0  calloc /mnt/data/build/slave/full_linux_build/build/tsan/ts_valgrind_intercepts.c:444
    ==6406==     #1  mem_sys_allocate_zeroed /usr/src/parrot/master/src/gc/alloc_memory.c:97
    ==6406==     #2  allocate_new_pool_arena /usr/src/parrot/master/src/gc/fixed_allocator.c:547
    ==6406==     #3  pool_allocate /usr/src/parrot/master/src/gc/fixed_allocator.c:448
    ==6406==     #4  Parrot_gc_pool_allocate /usr/src/parrot/master/src/gc/fixed_allocator.c:344
    ==6406==     #5  gc_gms_allocate_pmc_header /usr/src/parrot/master/src/gc/gc_gms.c:1490
    ==6406==     #6  Parrot_gc_new_pmc_header /usr/src/parrot/master/src/gc/api.c:312
    ==6406==     #7  get_new_pmc_header /usr/src/parrot/master/src/pmc.c:571
    ==6406==     #8  Parrot_pmc_new_init /usr/src/parrot/master/src/pmc.c:630
    ==6406==     #9  Parrot_thread_create_proxy /usr/src/parrot/master/src/thread.c:156
    ==6406==   Locks involved in this report (reporting last lock sites): {L31}
    ==6406==    L31 (0x42F02A8)
    ==6406==     #0  pthread_mutex_lock /mnt/data/build/slave/full_linux_build/build/tsan/ts_valgrind_intercepts.c:935
    ==6406==     #1  Parrot_Task_nci_send /usr/src/parrot/master/src/pmc/task.c:312
    ==6406==     #2  Parrot_NativePCCMethod_invoke /usr/src/parrot/master/src/pmc/nativepccmethod.c:122
    ==6406==     #3  Parrot_callmethodcc_p_sc /usr/src/parrot/master/src/ops/core_ops.c:18300
    ==6406==     #4  runops_fast_core /usr/src/parrot/master/src/runcore/cores.c:499
    ==6406==     #5  runops_int /usr/src/parrot/master/src/runcore/main.c:220
    ==6406==     #6  runops /usr/src/parrot/master/src/call/ops.c:123
    ==6406==     #7  Parrot_pcc_invoke_from_sig_object /usr/src/parrot/master/src/call/pcc.c:338
    ==6406==     #8  Parrot_ext_call /usr/src/parrot/master/src/extend.c:158
    ==6406==     #9  Parrot_Task_invoke /usr/src/parrot/master/src/pmc/task.c:168
    ==6406==     #10 Parrot_pcc_invoke_from_sig_object /usr/src/parrot/master/src/call/pcc.c:330
    ==6406==     #11 Parrot_ext_call /usr/src/parrot/master/src/extend.c:158
    ==6406==    Race verifier data: 0x5168EC1,0x516785D
    ==6406== }}}
    ok 5 Got message after block
    ok 6 Got existing message
    ok 7 task_to_kill running
    ok 8 task_to_kill killed
    ==6406==
    ==6406== ThreadSanitizer summary: reported 1 warning(s) (1 race(s))
  13. [GH #881] Do not ignore the exit opcode argument, fix t/pmc/task.t

    Reini Urban committed Dec 12, 2012
    The argument for the exit op is ignored, parrot always exits with 1.
    
    die_from_exception() uses Parrot_x_jump_out(interp, 1); even if the given exit_code was 0
    (branch severity == EXCEPT_exit)
    
    t/pmc/task.t cannot use test_more as ok updates the counter in a non-thread safe way.
    we also cannot use say as say is non-atomic, the final \n can be printed after the concurrent thread
    prints its line.
    sleep is also concurrent, so better use a poor mans busy sleep to wait to the task to be killed.
    The numbers seem to stable now, tested on a pretty fast multicore machine.
  14. [GH #836] pmc2c Sanify parameters beforehand and detect empty bodies

    Reini Urban committed Dec 12, 2012
    This leaves with a single remaining clang warning for math.ops, and several unrelated
    gcc warnings left. null, default and proxy are also detected correctly now.
  15. Fix wrong Parrot::Pmc2c::Method::decl

    Reini Urban committed Dec 12, 2012
    Failed when not in first line (s///m missing)
  16. [GH #836] Remove wrong 2x UNUSED(INTERP) in imageiothaw

    Reini Urban committed Dec 12, 2012
  17. [GH #836] rurban/pmc2c-2-gh836 ChangeLog line

    Reini Urban committed Dec 11, 2012
  18. [GH #836] Improved pmc2c

    Reini Urban committed Dec 11, 2012
    support multiple shim'able parameters
    warns on not SHIM'ed parameters, possibly internal unused variables
    warns on possibly forgotten UNUSED(param) declarations
    warns on an possible internal recursion error, when the UNUSED decl could not be replaced
    skips SHIM'ing method bodies with #if
    detect empty bodies and adds SHIM'ed INTERP and SELF params automatically
Commits on Dec 11, 2012
  1. [codingstd] does not like 2004-2008,2012- revert

    Reini Urban committed Dec 11, 2012
  2. [cage] Fix various cage compiler warnings

    Reini Urban committed Dec 11, 2012
    Shadowed variables from upper scope.
    SHIM unused interp,
    Remove unused local variables
    make headerizer
    Add documentation on unused arguments
  3. ParrotInterpreter.get_integer returns now the task id

    Reini Urban committed Dec 11, 2012
    Before it was hardcoded to 0.
    Add note that the tid ATTR is still unused.
  4. [cage] remove ending whitespace from t/fullharness

    Reini Urban committed Dec 11, 2012
  5. cage] move -Wcast-align to --cage, special-case src/string/sprintf.c,…

    Reini Urban committed Dec 11, 2012
    … spf_render.c
    
    add -Wno-unused-parameter to compilers/imcc/imclexer.c
    Only one math.ops unused-parameter warning remains with ICONST not needing INTERP.
    parrot is now warnings clean with clang, clang++, gcc and g++, besides the remaining
    pmc2c default, Null and Proxy UNUSED fixes
  6. [cage] Fix -Wreturn-type

    Reini Urban committed Dec 11, 2012
    control may reach end of non-void function in Parrot_interp_info_s()
    Return empty string in case of errors
  7. [cage] added final missing UNUSED pmc arg

    Reini Urban committed Dec 11, 2012
  8. [codingstd] wrap CONST_STRING arg in examples japhc.c

    Reini Urban committed Dec 11, 2012
  9. [cage] run make headerizer

    Reini Urban committed Dec 11, 2012
  10. [cage] mark PDB_disassemble_op space paramater as UNUSED when not --d…

    Reini Urban committed Dec 11, 2012
    …ebugging
  11. Merge branch 'master' into fix_unused_macros_gh879

    Reini Urban committed Dec 11, 2012
  12. [GH #879] more gcc -Werror=declaration-after-statement fixes

    Reini Urban committed Dec 11, 2012
    Note: These errors only appear when the UNUSED(SELF) line is not shimed away
    The new pmc2c removes this line, and SHIMs the paramater, so this problem was not detected