1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 23:31:55 -08:00
Commit graph

2857 commits

Author SHA1 Message Date
Bruce Mitchener
dd509cdee9 Fix typos. 2023-02-13 23:27:57 +07:00
Richard Brooksby
209af03d99 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
7ef53e411c Adding narrowing cast to suppress warning on fri6ll. 2023-01-11 18:18:51 +00:00
Richard Brooksby
2ccd0c1ed7 Adding narrowing cast to suppress warning on fr86ll. 2023-01-11 15:58:50 +00:00
Richard Brooksby
31478472a5 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
0b682800bc 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
5dc1361d17 Resolve legit warning from gcc 11.3.0 about potential array overruns. 2023-01-06 17:39:48 +00:00
Richard Brooksby
0e18922e29 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
e1af227429 Avoid compilation error from clang 13.1. 2022-08-21 08:25:50 +01:00
Gareth Rees
e23890afa9 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
740d616eaa 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
7e9a3e456d 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
7bf58e3f53 Represent the spare memory as a land. 2022-01-17 20:19:07 +00:00
Gareth Rees
fe656c0565 New api function mps_pool_walk. 2022-01-17 17:39:18 +00:00
Gareth Rees
c37f35532d New function scanstateupdatesummary updates seg summary after scan. 2022-01-17 17:12:58 +00:00
Gareth Rees
0ee4d7ca06 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
4251abf5c6 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
1ae7d9e863 Merge branch 'save-errno-win32' from filip strömbäck. 2021-08-08 12:11:38 +01:00
Gareth Rees
1660aea106 New platform lia6gc (linux, arm64, gcc). 2021-06-03 21:58:04 +01:00
Gareth Rees
61d8887ff8 New platform lia6ll (linux, arm64, clang/llvm). 2021-06-03 21:58:04 +01:00
Gareth Rees
ca146d96d6 New platform xca6ll (macos, arm64, clang/llvm). 2021-06-03 21:58:04 +01:00
Filip Strömbäck
1bd0f12e58 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
951493b588 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
5517e27d3a Apply suggestions from code review
Co-authored-by: Richard Brooksby <rb@ravenbrook.com>
2021-01-19 22:05:43 +00:00
Gareth Rees
0007fcbae7 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
452b023a8f 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
45376b0353 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
0b9dfabcac 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
e6ef975298 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
76bff163f5 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
1f07197a31 Remove mps_telemetry_control, deprecated since release 1.111.0. 2020-09-29 11:15:45 +01:00
Gareth Rees
1e77b9d762 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
7c286cba8f Remove mps_alloc_v, deprecated since release 1.112.0. 2020-09-26 15:08:31 +01:00
Gareth Rees
ac0b724847 Remove reservoir functions, deprecated since release 1.115.0 2020-09-24 11:36:46 +01:00
Gareth Rees
93438da02d 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
302c8d0b19 Remove mps_tramp, deprecated since release 1.111.0. 2020-09-24 09:30:33 +01:00
Gareth Rees
5acb13ba24 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
c825216539 Fix typos. 2020-09-01 16:33:45 +01:00
Gareth Rees
5d966c76fd Spell out "analysis" in full. 2020-09-01 13:54:31 +01:00
Gareth Rees
5559f36540 Fix indentation of second clause of license. 2020-08-30 10:13:06 +01:00
Gareth Rees
5165d75267 Use https: instead of http: when linking to the ravenbrook web site. 2020-08-30 10:13:03 +01:00
Gareth Rees
e7d4356705 Merge branch 'branch/2020-08-24/eintr' 2020-08-30 09:24:08 +01:00
Gareth Rees
ae265371c1 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
7c650f8051 Merge branch 'branch/2020-08-23/macos-build' 2020-08-30 09:08:38 +01:00
Gareth Rees
86525a2b0a 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
d8aed56eaa 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
1d00afac81 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
b3052e79c6 Avoid warning from gcc 5.4.0.
Copied from Perforce
 Change: 196419
2019-10-10 15:18:03 +01:00
Gareth Rees
d161061c79 The makefile rule for building a generic target no longer depends on the content of extra_targets, since this is designed to be configurable.
Copied from Perforce
 Change: 196414
2019-10-10 14:37:38 +01:00
Gareth Rees
db58f314d1 Avoid an "extended" (non-standards-conforming) call to offsetof.
Copied from Perforce
 Change: 196195
2019-06-05 16:31:13 +01:00