1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-23 07:12:12 -07:00
Commit graph

2811 commits

Author SHA1 Message Date
Richard Brooksby
6ac5dcb1f4 Declaring variable as static volatile to ensure clean communication with debugger and suppress warnings. this is a better expression of intention. 2023-03-08 11:03:27 +00:00
Richard Brooksby
4f69099fa6 Suppressing unused variable warning for static that we only look at from a debugger. 2023-02-21 16:17:51 +00:00
Richard Brooksby
b331e68916 Wrapping preservedinplacecount in statistic macros to suppress dataflow warning from clang. see <https://github.com/ravenbrook/mps/issues/163#issuecomment-1438723301>. 2023-02-21 16:09:04 +00:00
Richard Brooksby
4f2f097ef5 Merging branch/2023-01-06/gcc-11.3.0-warnings for github pull request 92 <https://github.com/ravenbrook/mps/pull/92>. 2023-01-16 15:14:34 +00:00
Richard Brooksby
8ab5806e31 Adding narrowing cast to suppress warning on fri6ll. 2023-01-11 18:18:51 +00:00
Richard Brooksby
cfb459b757 Adding narrowing cast to suppress warning on fr86ll. 2023-01-11 15:58:50 +00:00
Richard Brooksby
61ef072ba1 Merge branch 'branch/2023-01-05/travis-windows' into branch/2022-12-23/hardened-runtime to get travis to test this branch on windows before merging. 2023-01-11 08:20:17 +00:00
Gareth Rees
3818bf1e06 Handle errors from mmap and mprotect due to apple hardened runtime.
On Apple Silicon, when Hardened Runtime is in force and the
application lacks the "Allow Unsigned Executable Memory Entitlement",
mmap and mprotect return EACCES when an attempt is made to create or
modify memory so that it is simultaneously writable and executable.

This commit handles these cases by retrying the operation without the
PROT_EXEC flag, and setting global variables so that future operations
omit the flag.
2023-01-06 18:31:54 +00:00
Richard Brooksby
9ba1724cdb Resolve legit warning from gcc 11.3.0 about potential array overruns. 2023-01-06 17:39:48 +00:00
Richard Brooksby
119fa09bd9 Fix travis ci build for windows using auxiliary batch script to escape from git bash to visual studio. 2023-01-06 12:18:03 +00:00
Gareth Rees
4ed7bef4b2 Avoid compilation error from clang 13.1. 2022-08-21 08:25:50 +01:00
Gareth Rees
6a965b5ff0 Handle partial allocation failure by marking allocated pages spare and purging, as suggested by rb in review.
Copied from Perforce
 Change: 195997
2022-01-17 20:19:08 +00:00
Gareth Rees
71b05de30f Eliminate pagestate and pagepoolunion: spare pages are now represented by the spare page land, and free/allocated pages can be distinguished using the pool pointer.
Copied from Perforce
 Change: 195991
2022-01-17 20:19:08 +00:00
Gareth Rees
49a20700a7 Can't assert that res == reslimit since it may be an injected memory allocation failure from fotest.
Copied from Perforce
 Change: 195988
2022-01-17 20:19:07 +00:00
Gareth Rees
b0a1af5c05 Represent the spare memory as a land. 2022-01-17 20:19:07 +00:00
Gareth Rees
359bd5b034 New api function mps_pool_walk. 2022-01-17 17:39:18 +00:00
Gareth Rees
a8fe3c5134 New function scanstateupdatesummary updates seg summary after scan. 2022-01-17 17:12:58 +00:00
Gareth Rees
8b87dccf6e Indirect formatted scanning through the scanstate.
This will allow us to reuse the scanning protocol with an arbitrary area
scanning function (replacing traceFormatScan) in order to implement
formatted object walking without an extra segment method.

Don't insist on scanning only grey segments: we want to be able to
reuse the scan protocol for walking, when the segments are black.
2022-01-17 17:12:58 +00:00
Gareth Rees
839ce9c6d3 Swap .gitignore and .p4ignore.
Git version 2.32 added the backwards-incompatible "feature" that
.gitignore files that are symbolic links are ignored. Since all our
.gitignore files are symbolic links to the .p4ignore file in the same
directory, for compatibility between the Perforce and Git mirrors of
the repository, this broke "git status" for us and all our users.

See https://github.com/git/git/blob/master/Documentation/RelNotes/2.32.0.txt

This change swaps the files so that .p4ignore is a symbolic link to
.gitignore in each case.
2022-01-11 14:34:05 +00:00
Gareth Rees
689e4e6f83 Merge branch 'save-errno-win32' from filip strömbäck. 2021-08-08 12:11:38 +01:00
Gareth Rees
6b3a490b0e New platform lia6gc (linux, arm64, gcc). 2021-06-03 21:58:04 +01:00
Gareth Rees
331e8db191 New platform lia6ll (linux, arm64, clang/llvm). 2021-06-03 21:58:04 +01:00
Gareth Rees
992981c2d4 New platform xca6ll (macos, arm64, clang/llvm). 2021-06-03 21:58:04 +01:00
Filip Strömbäck
2956a4552d Save and restore getlasterror() on windows.
This is a patch for the problem outlined in issue https://github.com/Ravenbrook/mps/issues/61 - that the value in
GetLastError() is not automatically saved and restored when a vectored exception
handler is called. This is solved the same way as errno was handled on POSIX
systems.

This patch does *not* save and restore errno on Windows, since it seems like the
MPS does not call any functions that modify errno on the critical path on
Windows (generally only functions from POSIX do that).
2021-03-13 22:14:48 +01:00
Richard Brooksby
7b97640222 Merge pull request from ravenbrook/branch/2021-01-09/comma
Ensure that the MPS builds with "clang -Werror -Wcomma -std=c89"

GitHub-reference: https://github.com/Ravenbrook/mps/issues/48
2021-01-20 10:41:41 +00:00
Gareth Rees
0bf7951ba6 Apply suggestions from code review
Co-authored-by: Richard Brooksby <rb@ravenbrook.com>
2021-01-19 22:05:43 +00:00
Gareth Rees
5cc901bf96 Merge pull request from ravenbrook/branch/2020-09-27/mps-telemetry-control
Remove mps_telemetry_control, deprecated since release 1.111.0

GitHub-reference: https://github.com/Ravenbrook/mps/issues/42
2021-01-17 12:13:18 +00:00
Gareth Rees
3e925460ba Improve maintainability of complex loops.
1. Avoid looping over two expressions in parallel when one makes more
   sense (compilers can do strength reduction optimization: we don't
   need to do it ourselves).

2. Introduce macro ITER_PARALLEL for iterating over two expressions in
   parallel, to clarify the intention and explain the need for the
   cast to void in the implementation.

3. Add macros SAC_LARGE_ITER and SAC_SMALL_ITER to reduce the amount
   of code duplication in sac.c.
2021-01-16 17:06:07 +00:00
Gareth Rees
d17c6263b3 Ensure that the mps builds with "clang -werror -wcomma -std=c89".
The -Wcomma option appears to be turned on automatically by Xcode
12.3, so it's a good idea for the MPS to build with the option, to
avoid unpleasant surprises when people update their Xcode.

The simplest way to suppress the warning is to cast the left hand side
of the comma operator to void.
2021-01-16 17:06:06 +00:00
Richard Brooksby
5f4c3f6f42 Merge pull request from ravenbrook/branch/2021-01-10/implicit-conversion
Ensure that the MPS builds with Clang 10.

GitHub-reference: https://github.com/Ravenbrook/mps/issues/52
2021-01-16 16:16:40 +00:00
Gareth Rees
abb8e79e37 Document the reason for enabling so many warnings.
Cross-reference the design from the implementation in the compiler
makefile fragments.
2021-01-10 21:26:58 +00:00
Gareth Rees
7c6c56b541 Ensure that the mps builds with clang 10.
Clang 10 turns on -Wimplicit-int-float-conversion, and on 64-bit
platforms this issues a warning that implicit conversions to double
from Size and unsigned long "may lose precision".

This commit adds casts to (double) for all such conversions. The loss
of precision is either impossible in practice (because a double can
represent all integers up to 2**53, which is about 9 petabytes, well
beyond the addressing capabilities for current CPUs), or else
acceptable, because we are accumulating an approximate quantity like
"collection work" or "fill size" (that has to cope with loss of
precision due in any case), or computing a threshold like the spare
commit limit where it is acceptable for it to be somewhat approximate.
2021-01-10 10:42:05 +00:00
Gareth Rees
07db7f915c Remove mps_telemetry_control, deprecated since release 1.111.0. 2020-09-29 11:15:45 +01:00
Gareth Rees
aa61fabea2 Remove mps_fix, deprecated since release 1.111.0
Also remove undocumented and deprecated MPS_FIX macro, and rename
TRACE_FIX to TRACE_FIX12 to maintain parallelism.
2020-09-27 14:16:39 +01:00
Gareth Rees
4a28718571 Remove mps_alloc_v, deprecated since release 1.112.0. 2020-09-26 15:08:31 +01:00
Gareth Rees
1d59836ff2 Remove reservoir functions, deprecated since release 1.115.0 2020-09-24 11:36:46 +01:00
Gareth Rees
de7c1320df Remove mps_arena_expose, deprecated since release 1.111.0
Also remove mps_arena_unsafe_expose_remember_protection and
mps_arena_unsafe_expose_restore_protection.
2020-09-24 09:35:47 +01:00
Gareth Rees
2e9c91a2bd Remove mps_tramp, deprecated since release 1.111.0. 2020-09-24 09:30:33 +01:00
Gareth Rees
65065bc8c4 Save and restore errno in signal handlers.
Ensure there are assertions on the results of all the libc functions
in protsgix.c and pthrdext.c.
2020-09-02 19:59:23 +01:00
Bruce Mitchener
2c7f57d5b7 Fix typos. 2020-09-01 16:33:45 +01:00
Gareth Rees
30d9d30df0 Spell out "analysis" in full. 2020-09-01 13:54:31 +01:00
Gareth Rees
f47c389a52 Fix indentation of second clause of license. 2020-08-30 10:13:06 +01:00
Gareth Rees
af0f431eda Use https: instead of http: when linking to the ravenbrook web site. 2020-08-30 10:13:03 +01:00
Gareth Rees
d55dc069ab Merge branch 'branch/2020-08-24/eintr' 2020-08-30 09:24:08 +01:00
Gareth Rees
c13b7610d3 Set sa_restart flag when calling sigaction().
This ensures that if a mutator thread is blocked in a system call when
the MPS handles a signal, the system call will not fail with EINTR but
instead will be restarted.

Add a test case for the thread suspend and resume signals.
2020-08-30 09:23:35 +01:00
Gareth Rees
be2f670e42 Merge branch 'branch/2020-08-23/macos-build' 2020-08-30 09:08:38 +01:00
Gareth Rees
d14044dd1a Traceid is a typedef for unsigned so we mustn't negate it.
This was not caught by testing because we don't support multiple
traces and so tr->id is always zero.
2020-08-29 18:56:46 +01:00
Gareth Rees
d55a7f147c Fix build on macos 10.15 with clang 11.0.
We no longer need the -Wno-extended-offsetof or -Wno-invalid-offsetof
compiler options, since the nonstandard uses of offsetof() were
fixed (see job003619), so they can just be removed.
2020-08-23 16:17:36 +01:00
Peter Jackson
4de2606846 Publish licence updates in code directory.
Publish minor changes to readme and configure files in main directory.
Main directory and code directory licence texts are now fully updated.

Copied from Perforce
 Change: 196994
2020-06-11 17:05:40 +01:00
Gareth Rees
ee6ddafcbd Avoid warning from gcc 5.4.0.
Copied from Perforce
 Change: 196419
2019-10-10 15:18:03 +01:00