Jonathan Holburn
b028ba37df
Avoid type punning while using dylan test utilities
2023-05-17 21:30:07 +01:00
Jonathan Holburn
6c79248c66
Correct spelling of target
2023-05-17 20:52:31 +01:00
Jonathan Holburn
52c94e7c47
Correct capitalisation on target name
2023-05-17 20:48:33 +01:00
Jonathan Holburn
382445a9d6
Add addrobj.c to the testcases
2023-05-17 20:39:58 +01:00
Jonathan Holburn
00f1f156d1
Add addrobj.c testbench to test mps_addr_object()
2023-05-17 18:37:20 +01:00
Jonathan Holburn
a5c4bd4eb4
Checkl of addrobject method should not be commented out
2023-05-16 17:57:19 +01:00
Jonathan Holburn
7caefe081a
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
e3accea56d
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
ea36a51f82
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
ec75fdc86d
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
601976ff80
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
c709188183
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
9875ff7b9e
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
ef69911fdd
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
7482cf4f67
Cleaning up fixmes. we no longer initialize protocol classes with static initializers.
2023-03-09 10:06:39 +00:00
Richard Brooksby
3f0496d325
Cleaning up fixmes. inststruct does not have a signature.
2023-03-09 09:59:16 +00:00
Richard Brooksby
9fda23f4c6
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
cc1731dcd0
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
d92239c2ab
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
93e50e49d5
Documenting deprecation of getpagesize().
2023-03-04 07:56:29 +00:00
Bruce Mitchener
c261059da2
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
29cd6336df
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
1479671d85
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
59f97ea66c
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
6651dec098
Suppressing unused variable warning for static that we only look at from a debugger.
2023-02-21 16:17:51 +00:00
Richard Brooksby
6e73e0b166
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
eb8d6c211a
Downgrading old fixmes to todos with better explanation of tasks.
2023-02-20 08:51:15 +00:00
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