[parrot/parrot] 2484b5: [gc] fix a MS segv in Parrot_io_write_s

GitHub noreply at github.com
Sun Feb 1 19:50:20 UTC 2015


  Branch: refs/heads/smoke-me/gc-ms-default
  Home:   https://github.com/parrot/parrot
  Commit: 2484b5401f194aeb7f00a8718e837e1032a4b821
      https://github.com/parrot/parrot/commit/2484b5401f194aeb7f00a8718e837e1032a4b821
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2015-02-01 (Sun, 01 Feb 2015)

  Changed paths:
    M src/gc/string_gc.c
    M src/io/api.c

  Log Message:
  -----------
  [gc] fix a MS segv in Parrot_io_write_s

When certain functions cause a GC, the local string buffers may get
moved away, but local STRING* variables or worse, strings inside a
StringHandle may still point to the old location.

Lock the GC then for this section, mostly during IO writing to string handles,
when the handle needs to realloc its buffer (the stringhandle).
But reading into a buffer is also problematic. we really should know the
size beforehand.

One way to fix GH #1196, lock the GC sweep in those cases.
The other variants would be:
- lock the whole GC via Parrot_block_GC_mark
- unset the PObj_is_movable flag in the STRING that it may not be moved,
  as it is still locally referenced.

Remaining ms test failure: t/pmc/fixedstringarray.t


  Commit: 1cc6cf19ef1b188235fc8277752ee0a9f577ad9f
      https://github.com/parrot/parrot/commit/1cc6cf19ef1b188235fc8277752ee0a9f577ad9f
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2015-02-01 (Sun, 01 Feb 2015)

  Changed paths:
    M config/auto/gc.pm

  Log Message:
  -----------
  [config] set MS as new GC default


Compare: https://github.com/parrot/parrot/compare/2484b5401f19^...1cc6cf19ef1b


More information about the parrot-commits mailing list