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

2833 commits

Author SHA1 Message Date
Jonathan Holburn
ba4abd8ae2 Add addrobj.c to the testcases 2023-05-17 20:39:58 +01:00
Jonathan Holburn
6ccd353499 Add addrobj.c testbench to test mps_addr_object() 2023-05-17 18:37:20 +01:00
Jonathan Holburn
4a6c61b767 Checkl of addrobject method should not be commented out 2023-05-16 17:57:19 +01:00
Jonathan Holburn
20f96d80a5 Add implementation of mps_addr_object as implemented by jph on top of branch cet-merge-2 and subsequently became mps-2022. directly fix some whitespace according to c syntax conventions and remove boolean operation on a pointer 2023-05-16 17:26:00 +01:00
Richard Brooksby
53d522b506 Merging branch/2023-03-04/getpagesize-vs-sysconf for github pull request <https://github.com/ravenbrook/mps/pull/188>.
GitHub-reference: https://github.com/Ravenbrook/mps/issues/188
2023-03-23 22:17:37 +00:00
Richard Brooksby
0538ddb984 Merging branch/2023-02-27/correct-file-names for github pull request <https://github.com/ravenbrook/mps/pull/179>.
GitHub-reference: https://github.com/Ravenbrook/mps/issues/179
2023-03-23 22:09:32 +00:00
Richard Brooksby
0460bcf671 Minor documentation improvements in response to review <https://github.com/ravenbrook/mps/pull/179#pullrequestreview-1354912126>. 2023-03-23 15:44:06 +00:00
Richard Brooksby
1aa18cdc00 Merging branch/2023-03-09/sig-design-tidy for github pull request <https://github.com/ravenbrook/mps/pull/193>.
GitHub-reference: https://github.com/Ravenbrook/mps/issues/193
2023-03-13 20:17:31 +00:00
Richard Brooksby
f84241fa4f Merging branch/2023-02-21/termux-build for github pull request <https://github.com/ravenbrook/mps/pull/164>.
GitHub-reference: https://github.com/Ravenbrook/mps/issues/164
2023-03-09 11:53:39 +00:00
Richard Brooksby
1610d65d4c Explaining the purpose of the calls variable in response to <https://github.com/ravenbrook/mps/pull/164#discussion_r1130845346>. 2023-03-09 11:33:14 +00:00
Richard Brooksby
39e2e60cd1 Cleaning up fixmes. moving signature on abqstruct to the start, since i couldn't find any justification for it to be at the end. it was always at the end. 2023-03-09 10:11:12 +00:00
Richard Brooksby
9f202d3521 Cleaning up fixmes. we no longer initialize protocol classes with static initializers. 2023-03-09 10:06:39 +00:00
Richard Brooksby
0d9d4bfaa1 Cleaning up fixmes. inststruct does not have a signature. 2023-03-09 09:59:16 +00:00
Richard Brooksby
787ea7d302 Moving design documentation of signatures to design.mps.sig and updating tagging from code to be consistent. 2023-03-09 09:40:03 +00:00
Richard Brooksby
a1147b996d Merging branch/2023-02-13/fix-typos for github pull request <https://github.com/ravenbrook/mps/pull/149>.
GitHub-reference: https://github.com/Ravenbrook/mps/issues/149
2023-03-08 11:10:53 +00:00
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
38cc6e4f8e Documenting deprecation of getpagesize(). 2023-03-04 07:56:29 +00:00
Bruce Mitchener
322dc834d9 Unix: use sysconf(_sc_pagesize), not getpagesize()
The `getpagesize()` is a legacy function and is not available
in the default configurations on some platforms.

The documentation for `getpagesize()` recommends using the POSIX
`sysconf(_SC_PAGESIZE)` instead.

Additionally, `sysconf(_SC_PAGESIZE)` returns a `long` rather than
an `int`, so the code is updated to handle that as well.

Sources:

* https://man7.org/linux/man-pages/man2/getpagesize.2.html
* https://pubs.opengroup.org/onlinepubs/7908799/xsh/getpagesize.html
2023-03-04 14:11:09 +07:00
Bruce Mitchener
892063a954 Correct file name references.
The checks that these files are being used on the right platform
contain the wrong file names.
2023-02-27 10:19:55 +07:00
Richard Brooksby
f54fea1f9d Clarifying todo in response to review <https://github.com/ravenbrook/mps/pull/119#discussion_r1115542531>. 2023-02-24 09:07:28 +00:00
Richard Brooksby
eaa9e9cb22 Adding references to issues raised by review <https://github.com/ravenbrook/mps/pull/119#discussion_r1115543553>. 2023-02-24 08:53:03 +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
c88e4e8a05 Downgrading old fixmes to todos with better explanation of tasks. 2023-02-20 08:51:15 +00:00
Bruce Mitchener
0f6e2f7a20 Fix typos. 2023-02-13 23:27:57 +07: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