Commit Graph

39978 Commits

Author SHA1 Message Date
Matthew Flatt
0d55a05b46 cs: fix a case in unsafe-add-collect-callbacks
Fix a function-call shape that is used for GTK+2.
2019-05-12 14:45:26 -06:00
Matthew Flatt
ff95f1860a io: fix hostname lookup for tcp-listen
Need to lookup with "passive" flag. Some platforms/configurations
apparently don't care, but some do.
2019-05-11 18:56:57 -06:00
Matthew Flatt
528da9e815 racket-benchmarks: repair for bar plots 2019-05-11 18:56:57 -06:00
Paulo Matos
a672ac9907
Fix simple typo
s/emable/enable/
2019-05-11 17:48:01 +02:00
Matthew Flatt
59d5300f77 makefile: fix configure dependencies
Reconfigure if "cfg-racket" changes without "configure" changing.
2019-05-10 21:21:54 -06:00
Lukas Lazarek
001eeded9f racket/contract: Fix (box/c #:immutable #f) failing on mutable boxes 2019-05-10 21:05:23 -05:00
Matthew Flatt
bfe649bcc7 adjust GC behavior to be more usable without generational collection
Instead of limiting the nursery size and performing a full GC every
time a small nursery is full, allow the nursery to be proportional
to the total heap size if generational GC is disabled.
2019-05-10 19:45:05 -06:00
Paulo Matos
7c3a207f36 Add configure option --enable-generations (enabled by default).
This option allows the user to enable or disable (with
--disable-generations or --enable-generations=no) generations in
3m. Disabling generational collection is, in most cases, a bad
idea, but it may be necessary on a platform where signal handling
doesn't work well enough to support a write barrier that is
implemented with page protection.
2019-05-10 19:44:46 -06:00
Matthew Flatt
eeaac9c142 avoid unspecified NULL passed to memcpy
Closes #2632
2019-05-10 19:35:38 -06:00
Matthew Flatt
deb5e43fab traditional benchmarks: more consistent error calls
Avoid Chez Scheme warnings due to `error` calls that don't match its
calling convention.
2019-05-10 19:35:38 -06:00
Matthew Flatt
35e98675b6 racket-benchmarks: add tool for simple bar plots 2019-05-10 17:35:53 -06:00
Matthew Flatt
bb7836e734 cs: support --enable-natipkg 2019-05-10 17:35:53 -06:00
Matthias Felleisen
67ff3bc81c added promised note on no-contract' section 2019-05-10 18:37:07 -04:00
Paulo Matos
0dffc2fb29 Use all CPUS available for CI on the runner and install qemu magic
There are two parts to this commit:
* Until now we have been hardcoding the number of cores used per job
  but this is wrong. We should use all cores available but limit new
  jobs spawning if the load is too high. This enables us to use the 40
  cores available in the pinwheel server.
* Unless qemu has been already installed, the job will fail because
  the qemu magic has not been ran. Now we run the qemu magic in any
  case. If the magic has been previously installed, it gets
  updated. This was noticed when I started running racket jobs on the
  brand new pinwheel.
2019-05-10 22:00:40 +02:00
Paulo Matos
75cc43aa56
In autoconf 2.70 variable runstatedir was added - ignore (#2606)
Ignore new autoconf variable added in 2.70.
The interesting thing is that debian decided to backport this variable
to their 2.69 release so in some 2.69 autoconf this variable does not
exist but in debian ports 2.69 generates this variable. It is
nonetheless not useful for Racket, so add to ignore list.
2019-05-10 18:19:49 +02:00
Matthew Flatt
0884918af6 makefile: add PACK_BUILT_OPTIONS for control over distro package form 2019-05-10 07:20:31 -06:00
Matthew Flatt
d5a46eb39d cs: repair build without --enable-racket
When using a built-for-bootstrapping Racket to build Racket CS, the
intermediate module loading module mode should be `--boot` instead of
`--chain`. The repo's top-level makefile takes care of that already,
but not `configure`-generated makefiles as may happen in a build from
a source distribution.
2019-05-10 07:20:31 -06:00
Matthew Flatt
8ade5f94c6 makefile: configurable options for install of packages within a distro 2019-05-10 07:20:31 -06:00
Robby Findler
2c3fce244c added #:unprotected-submodule 2019-05-08 20:32:04 -05:00
Matthew Flatt
b7d738d59a cm: fix lock more
Still trying to get it right for the repair started in 70e0cac062 and
continued in ef1004fdc0.
2019-05-06 20:17:38 -06:00
Matthew Flatt
93d84170d0 read: fix #e after #x
Corrects a bug in 0549bfb1e5 where `#x` causes the `e` in `#e` to be
interpreted as 14 instead of the character `#\e`.
2019-05-06 08:14:20 -06:00
Matthew Flatt
bed23e221e update racket HISTORY.txt for v7.3 2019-05-06 07:34:55 -06:00
Matthew Flatt
83ad6bd7c1 cs: fix banner and make startup use it
The string returned by `banner` was missing a "v" and a "." compared
to the traditional result. Avoid duplicating the string in "main.sps".
2019-05-05 17:34:04 -06:00
Matthew Flatt
151b5755c5 cs: repairs for inaccessible custodians and custodian boxes
Allows an inaccessible custodian to be GCed, promoting any values that
it manages to its parent custodian. Also repair memory accounting for
custodian boxes.

For values referenced by a custodian, the nature of the custodian's
weak references is slightly different on Racket CS. The reference is
weak enough that the value can be finalized via will (e.g., to close
an unused port), but it's not weak enough to allow weak boxes, weak
hash table keys, or ephemeron keys to be cleared. That's a consequence
of using ordered finalization instead of finalization/weakness levels.
This difference could be avoided at the cost of an extra wrapper for
any finalized value and a discipline of using such wrappers as the
user-visible reference for all custodian-managed values, but semi-weak
references so far appear to be practical and a better compromise.
2019-05-03 19:16:45 -06:00
Matthew Flatt
9951efc891 cs: fix unsafe-thread-at-root to use the root custodian
Otherwise, a finalization thread can get shut down, resulting in a
leak.
2019-05-03 15:00:33 -06:00
Matthew Flatt
12e2b88197 raco: fix doc typo 2019-05-03 13:18:27 -06:00
Matthew Flatt
ef1004fdc0 cm: fix lock
Commit 70e0cac062 neglected to use `#:for-lock? #t` as intended.
2019-05-03 12:57:58 -06:00
Matthew Flatt
f52fdfdd6e expander: preserve inlining annotations in machine-independent bytecode 2019-05-03 10:36:42 -06:00
Matthew Flatt
94a24efd10 ffi docs: clarifications on string representations 2019-05-03 09:16:35 -06:00
Matthew Flatt
920c899ba8 thread: adjust use of later will executor for custodian
The use of a will executor for a custodian is a bit of a hack, and it
doesn't want the "keep live until executed" constraint. So, add an
optional internally.
2019-05-03 06:28:25 -06:00
Matthew Flatt
e13fac3ccf foreign: document internal make-late-will-executor
Also, rename from "stubborn" to "late" internally to be more
consistent and avoid overloading "stubborn" in the allocator.
2019-05-03 06:20:11 -06:00
Matthew Flatt
032479cf2c keep late will executors live with pending wills
If a late will executor has pending will, then it needs to stay
live until the enclosing place has terminated (and post-custodian
callbacks are run). Otherwise, `ffi/unsafe/alloc` can lose values
that it expects to finalize, and it reports an "internal error".

The late will executor for `register-finalizer` from `ffi/unsafe`
was kept live in traditional Racket, but only as an accident of
custodian shutdown in a terminating place: the shutdown process skips
threads, since that work is technically not necessary. Relying on that
coincidence is asking for trouble, though, so implement retention more
deliberately.
2019-05-03 05:39:15 -06:00
Matthew Flatt
358764faac cs: fix retention of late will executors
A late will executor must stay live as long as it has finalizations
registered.
2019-05-03 05:38:54 -06:00
Matthew Flatt
8f5f0a4330 cs: implement foreign-call locks 2019-05-02 20:09:43 -06:00
Matthew Flatt
d5243820f6 cs & schemify: faster ptr-ref and ptr-set! on primitive types
Recognize `(ptr-ref <ptr> _uint8)`, etc., and turn it into a more
direct `(ptr-ref/uint8 <ptr>)`, etc. This improvement speeds PNG
loading by a factor of 10 to 20, for example, because the
implementation expects the pattern to be recognized.
2019-05-02 17:31:40 -06:00
Jason Hemann
03b5a65e0f Adding line break in for*/lists defform
The `body` was landing on the `syntax` in the online doc, looked a little gross.
2019-05-02 14:58:30 -06:00
Ben Greenman
a13070f302 racket/contract: improve fast-append
test whether the 2nd arg is null once, rather than N times
2019-05-02 11:35:55 -04:00
Ben Greenman
721ef2050f racket/contract: move comment
Move a comment closer to the code it talks about
2019-05-02 11:35:55 -04:00
Matthew Flatt
5b929a7621 io: fix port custodian unregister
Make unregister match the register change in 11789ff8b0.
2019-05-02 07:26:20 -06:00
Matthew Flatt
651fc3ae5e ffi/unsafe/com: use ffi/file instead of C API 2019-05-01 14:43:36 -06:00
Matthew Flatt
92c12de018 cs: implement prop:exn:srclocs in exn:fail:read 2019-05-01 14:43:36 -06:00
Matthew Flatt
cbbf7a7c2b adjust tests for Racket CS 2019-05-01 14:43:36 -06:00
Matthew Flatt
fb968db7a5 cs & thread: detect plumber-flush errors on place exit 2019-05-01 13:46:46 -06:00
Matthew Flatt
cfeef54a28 cs & threads: run post-custodian shutdown actions on place exit 2019-05-01 13:22:47 -06:00
Matthew Flatt
193bec6b7d cs & threads: more place-message repairs for graphs 2019-05-01 09:24:39 -06:00
Matthew Flatt
9268dcaad3 cs: better handling for contended hash-table locks
When the number of places approaches the number of available
processing cores, then a spin lock isn't good enough for a small
number of contended hash tables (maybe just one of them). When
contention is discovered, fall back to a mutex-based lock.
2019-05-01 09:24:39 -06:00
Alexis King
1101461434 rktio: Make sure not to close subprocess standard in/out/err
When spawning a new subprocess, it's possible that one or more of the
new process's standard input, output, or error descriptors use file
descriptor 0, 1, or 2, even if they don't correspond to any of the
parent process's original standard input, output, or error descriptors.
This can happen if the parent process closes one of its standard
descriptors, and the operating system reuses the file descriptor number
for a new descriptor.

Therefore, be more careful about closing and copying file descriptors in
the child process before calling `exec`. Specifically, move file
descriptors out of the way as needed so they aren't clobbered, and
accommodate cases where multiple standard streams may share the same
file descriptor in the parent process.

fixes #2634
2019-05-01 09:10:33 -05:00
Paulo Matos
2cbc07cab2 Revert "Use qemu 4.0.0 for cross-arch CI"
This reverts commit 9e7fa9b859.
CI had some unexpected results with this new version overnight. As a
result and until I investigate this, let go back to 3.1.0.
2019-05-01 07:38:48 +02:00
Matthew Flatt
f3de3e4584 cs & threads: repairs for places
Includes a repair for handling vectors and prefab structs that are
involved in cycles.
2019-04-30 20:28:38 -06:00
Matthew Flatt
635c64e8bb racocs make: repair --no-deps destination 2019-04-30 19:00:52 -06:00