Matthew Flatt
75c8c3ce37
fix bytes-utf-8-ref
to accept 5 arguments as documented
2019-02-22 18:46:36 -07:00
Matthew Flatt
c4a23595b9
json: faster parsing
...
Replace some regexœp operations with more direct `peek-char` and
read-char` operations.
2019-02-22 13:06:49 -07:00
Paulo Matos
fe945fe1dc
Mark cs tests as allowing failure for Gitlab
...
This is a temporary measure in order to avoid Gitlab marking commits as failing. This is a known issue.
2019-02-22 11:35:33 -07:00
Paulo Matos
38f518a7aa
Define MZ_DECLARE_NORETURN to use noreturn attribute
...
This helps the static analyzer understand which functions don't
return, and therefore improves the static analysis results greatly.
2019-02-22 11:35:08 -07:00
Jesse Alama
1eafd1518e
Offer 7.2 in .travis.yml
...
Bring the boilerplate .travis.yml up-to-date.
2019-02-22 11:34:39 -07:00
Paulo Matos
7a6536ab6d
Remove unnecessary exit(0);
...
This was necessary to avoid warnings in a specific compiler but after
adding MZ_DECLARE_NORETURN, this is now unnecessary.
2019-02-22 08:52:09 -07:00
Paulo Matos
ef8b31b527
Use noreturn attribute only when MZ_DECLARE_NORETURN
2019-02-22 08:52:09 -07:00
Paulo Matos
5b837b895f
Put all declarations with NORETURN in a single line
...
If declarations are not in a single line makex.rkt gets confused and
mis-parses the declarations.
2019-02-22 08:52:09 -07:00
Paulo Matos
0659e51b3f
Mark other error functions as NORETURN
...
Related to PR #2472 , marks a few other functions as NORETURN.
Namely:
- scheme_signal_error
- scheme_wrong_count
- scheme_wrong_count_m
- scheme_case_lambda_wrong_count
- scheme_wrong_type
- scheme_wrong_contract
- scheme_wrong_field_type
- scheme_wrong_field_contract
- scheme_arg_mismatch
- scheme_contract_error
- scheme_wrong_return_arity
- scheme_unbound_global
Unfortunately static analysis is done per compilation unit, so
although, for example, scheme_wrong_contract calls scheme_raise_exn
and the latter is already marked NORETURN, the analyzer does not know
this. Therefore we need to manually propagate the NORETURN for each
function declaration.
2019-02-22 08:52:09 -07:00
Matthew Flatt
b7654d9a84
cs: avoid uninitialized bytevectors via ffi/unsafe
...
Zeroing out allocated memory is required by the specification of
`alloc` from `ffi/unsafe`.
Possibly relevant to #2493
2019-02-21 08:39:06 -07:00
Matthew Flatt
858a925c16
remove another dead assignment to buf, which also causes leak
...
These leaks happen just once in startup code, so they
didn't matter in practice --- but, obviously, its better to
fix them.
2019-02-20 16:35:27 -07:00
Matthew Flatt
a119804827
remove unused call to GC_set
...
Closes #2339
2019-02-20 16:35:27 -07:00
Matthew Flatt
6a94ce5c04
fix error-message typo
2019-02-20 16:35:27 -07:00
Paulo Matos
6fa0e4fc64
Avoid dead initialization of boot_offset
...
Assuming here that ELF_FIND_BOOT_SECTION and WIN32 are mutually exclusive.
2019-02-20 16:35:19 -07:00
Philip McGrath
fe563735be
ffi/unsafe/alloc: handle keyword arguments
...
closes https://github.com/racket/racket/issues/2484
2019-02-20 16:29:28 -07:00
Paulo Matos
be054f6149
free buf to avoid memory leak
2019-02-20 16:27:58 -07:00
Paulo Matos
f75c641bb8
Fix typo in ffi docs
2019-02-20 16:26:14 -07:00
Paulo Matos
490105ed53
Remove dead store for rator
2019-02-20 16:25:38 -07:00
Paulo Matos
10d721eaea
Remove dead store for did_alt
2019-02-20 16:24:45 -07:00
Paulo Matos
7e856b3b4d
Remove dead assignment to buf which also causes leak
2019-02-20 16:23:30 -07:00
Paulo Matos
671611e992
Remove dead store for closure_size
2019-02-20 16:22:24 -07:00
Ben Greenman
6bd54d24a4
typo: 'by precede it'
...
Closes #2499
2019-02-20 12:17:15 -05:00
Ryan Culpepper
d185257a75
add unsafe-poll-fd, unsafe-fd->evt ( #2414 )
...
The unsafe-fd->evt interface is based on unsafe-{file-descriptor,socket}->semaphore.
The main differences are that these events are level-triggered, not edge-triggered, and
they do not cooperate with ports created by unsafe-{file-descriptor,socket}->port.
2019-02-20 13:53:11 +01:00
Ryan Culpepper
abb1ce71cc
update expr/c, wrap-expr/c tests for contract message change
2019-02-19 15:09:51 +01:00
Paulo Matos
166c97ecea
Fix missing parens
...
There's a paren mismatch introduced by a previous commit
2019-02-19 11:22:54 +01:00
Gustavo Massaccesi
5c1b1bf8cf
fix with-syntax* when it has no patterns
...
This also fix define-inline for 0-arity functions.
2019-02-18 20:07:45 -03:00
Gustavo Massaccesi
3c4f160346
make file-stream-port? and terminal-port? total
2019-02-18 20:07:19 -03:00
Matthew Flatt
66f7e0c3e3
cs: fix slowness in set!
, vector, and box operations
2019-02-18 11:59:28 -07:00
pedagand
cb8fde7a9e
Fix typo
...
`tmp` does not need to be alpha-renamed in this case.
2019-02-17 07:25:18 -07:00
Ryan Kramer
d8eb9640ec
restate that #f indicates the default readtable
2019-02-17 07:22:26 -07:00
Matthew Flatt
f14d7e06bb
Make noreturn attribute valid only for GNUC implementations
...
.. with an `exit` call to make the declaration clearly true to the
compiler.
2019-02-17 07:14:34 -07:00
Matthew Flatt
6117d8aff4
Revert "Make noreturn attribute valid only for GNUC implementations"
...
This reverts commit d033dd1ed2
.
2019-02-17 07:09:48 -07:00
Paulo Matos
0124210b0b
Avoid conn memory leak if try_connect fails ( #2481 )
2019-02-17 07:04:32 -07:00
Paulo Matos
41b282d3ae
Merge pull request #2480 from LinkiTools/pmatos-clanganal-9
...
Avoid memcpy from null pointer in do_inotify_add
2019-02-17 07:04:06 -07:00
Paulo Matos
d033dd1ed2
Make noreturn attribute valid only for GNUC implementations
2019-02-17 07:03:46 -07:00
Paulo Matos
3e301d22b5
Mark scheme_raise_exn as noreturn - regenerate schemex
...
scheme_raise_exn raises an exception and doesn't return.
Static analysis tools find a huge amount of problems with regards
to memory leaks that are actually false positives because the tools
are not aware the function does not return. Marking it as such aids
further inspection of real problems.
2019-02-17 07:03:46 -07:00
Matthew Flatt
0567527be4
io: fix unsafe-poller
...
When asking a poller to register wakup events, handle an
"event is ready" response by canceling the sleep.
Closes #2482
2019-02-16 19:35:01 -07:00
Ryan Culpepper
edeae791ab
syntax/parse: fix #:attr-name-separator, used by honu macros
2019-02-15 12:25:10 +01:00
Matthew Flatt
30e260835f
fix \D, \S, \W in string regexp
...
The documentation and implementation were confused about whether \D,
\S, and \W match non-ASCII characters. Now they do. The new regexp
implementation (as used in Racket CS) already matched them.
2019-02-14 11:50:58 -07:00
Paulo Matos
f4c48dd9b5
Assigned value at initialization is never read
...
Assigning variable instead to NULL.
2019-02-14 08:11:50 -08:00
Paulo Matos
5ea27fc972
Remove unused variable did
...
Used to be useful but now it's no longer the case.
2019-02-14 08:10:24 -08:00
Paulo Matos
1722e49c85
Remove dead code
...
I understand what the idea is in this file, except this code won't
work like the author expected it to. Variables marked for wiping won't
be wiped unless they are marked as volatile. The compiler will simply
remove the code wiping the variables and issue a warning, which is
what brought me to look into this code in the first place.
2019-02-14 08:09:26 -08:00
Paulo Matos
136ea767e2
Free memory stored when error occurs - otherwise buffer leaks
2019-02-14 08:08:27 -08:00
Paulo Matos
14499aa822
Free buffer in case of unknown error - avoids memory leak
2019-02-14 08:07:49 -08:00
Paulo Matos
4014b066d1
Remove assignment - value stored to cpos is never read
2019-02-14 08:06:39 -08:00
Paulo Matos
04e6422c72
Ensure copied is not overwritten by another strdup causing a leak
2019-02-14 08:04:38 -08:00
Matthew Flatt
e7e9d02c9e
native-libs: patches to adjust Pango font-face matching
2019-02-14 08:57:51 -07:00
Matthew Flatt
ecf3766d96
io: reduce overhead on display
and write-bytes
2019-02-13 16:18:22 -07:00
Matthew Flatt
17c46c9c36
io: fix file and TCP ports as place messages
2019-02-13 10:48:55 -07:00
Matthew Flatt
a4bd83011b
io: fix result of file-stream-port?
2019-02-13 10:41:12 -07:00