Package: gap / 4r10p0-7

Metadata

Package Version Patches format
gap 4r10p0-7 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
fix test bigendian | (download)

tst/testinstall/pperm.tst | 10 5 + 5 - 0 !
1 file changed, 5 insertions(+), 5 deletions(-)

---
fix convert.pl | (download)

doc/gapmacro.tex | 8 6 + 2 - 0 !
etc/convert.pl | 9 6 + 3 - 0 !
2 files changed, 12 insertions(+), 5 deletions(-)

 GAP assumes packages doc are built inside the GAP root.  This patch convert
 relative reference to absolute reference, based on $gaproot/pkg/gapdoc/doc.
 Note that gapdoc is irrelevant here, except that it is always available.
convert.pl repro | (download)

etc/convert.pl | 11 9 + 2 - 0 !
1 file changed, 9 insertions(+), 2 deletions(-)

 fix convert.pl to allow reproducible build.
 Change convert.pl to use GAP_CONVERT_DATE for generated date manual.
config sub guess | (download)

cnf/config.guess | 4 4 + 0 - 0 !
cnf/config.sub | 4 4 + 0 - 0 !
2 files changed, 8 insertions(+)

---
doc makefile | (download)

doc/Makefile | 31 31 + 0 - 0 !
1 file changed, 31 insertions(+)

---
fix make_doc | (download)

doc/make_doc.in | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

---
program path | (download)

lib/package.gi | 2 2 + 0 - 0 !
1 file changed, 2 insertions(+)

---
remove infopackage warning | (download)

lib/package.gi | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

---
fix test dir | (download)

tst/testinstall/dir.tst | 5 0 + 5 - 0 !
1 file changed, 5 deletions(-)

---
no needed pkg | (download)

lib/package.gi | 2 1 + 1 - 0 !
lib/system.g | 6 3 + 3 - 0 !
2 files changed, 4 insertions(+), 4 deletions(-)

---
gac | (download)

cnf/gac.in | 6 3 + 3 - 0 !
1 file changed, 3 insertions(+), 3 deletions(-)

---
fix Makefile | (download)

Makefile.rules | 8 4 + 4 - 0 !
1 file changed, 4 insertions(+), 4 deletions(-)

---
fix libtool | (download)

configure | 1 0 + 1 - 0 !
1 file changed, 1 deletion(-)

---
sage 1 pr 3102 | (download)

src/sysfiles.c | 33 22 + 11 - 0 !
1 file changed, 22 insertions(+), 11 deletions(-)

 [patch] prevent infinite recursions in echoandcheck sywriteandcheck
 in cases where the default stdio output streams cannot be written to


sage 2 kernel add helper | (download)

src/error.c | 42 42 + 0 - 0 !
src/error.h | 8 8 + 0 - 0 !
src/scanner.c | 3 2 + 1 - 0 !
3 files changed, 52 insertions(+), 1 deletion(-)

 [patch 2/3] kernel: add helper function for writing error messages to
 the file/stream referenced by the ERROR_OUTPUT global variable


sage 3 Prototype for GAP | (download)

src/gapstate.h | 3 3 + 0 - 0 !
src/gasman.c | 6 6 + 0 - 0 !
src/gasman.h | 15 15 + 0 - 0 !
src/libgap-api.c | 27 27 + 0 - 0 !
src/libgap-api.h | 88 86 + 2 - 0 !
5 files changed, 137 insertions(+), 2 deletions(-)

 [patch 3/3] prototype for gap_enter/leave macros to bracket use of
 libgap and stack local GAP objects in code which embeds libgap

There are two parts to this:

First, the outer-most GAP_Enter() must set the StackBottom variable for GASMAN,
without which objects tracked by GASMAN that are allocated on the stack are
properly tracked (see #3089).

Second, the outer-most GAP_Enter() call should set a jump point for longjmps to
STATE(ReadJmpError).  Code within the GAP kernel may reset this, but we should
set it here in case any unexpected errors occur within the GAP kernel that are
not already handled appropriately by a TRY_IF_NO_ERROR.

For the first issue, we add GAP_EnterStack() and GAP_LeaveStack() macros which
implement *just* the StackBottom handling without any other error handling.  We
also add a function to gasman.c called _MarkStackBottomBags which just updates
the StackBottom variable.  Then the macro called MarkStackBottomBags (same name
without underscore) can be used within a function to set StackBottom to
somewhere at or near the beginning of that function's stack frame.  This uses
GCC's __builtin_frame_address, but supported is probably needed for other
platforms that don't have this.

The state variable STATE(EnterStackCount) is used to track recursive calls into
GAP_EnterStack().  We only want to set StackBottom on the outer-most call.  The
count is decremented on GAP_LeaveStack().  Some functions are provided for
manipulating the counter from the API without directly exposing the GAP state,
but I'm not sure if this is necessary or desirable, especially since it means
EnterStackCount isn't updated atomically.  My hope was to avoid exposing too
many GAP internals, but it may be necessary in order to implement these as
macros.

For setting the STATE(ReadJmpError) jump buffer we provide a macro called
GAP_Error_Setjmp() which is fairly straightforward, except that it needs to be
written in such a way that it can be used in concert correctly with
GAP_EnterStack().  In particular, if returning to the site of a
GAP_Error_Setjmp() call we do not want to accidentally re-increment the
EnterStackCount.

Finally, the higher-level GAP_Enter() and GAP_Leave() macros are provided: The
latter is just an alias for GAP_LeaveStack(), but the former carefully combines
*both* GAP_Error_Setjmp() and GAP_EnterStack().  Although called like a
function, the GAP_Enter() macro expands to a compound statement (necessary for
both GAP_EnterStack() and GAP_Error_Setjmp() to work properly).  The order of
expansion is also deliberate so that this can be used like:

    jmp_retval = GAP_Enter();

so that the return value of the setjmp call can be stored in a variable while
using GAP_Enter(), and can be checked to see whether an error occurred.
However, this requires some care to ensure that the following GAP_EnterStack()
doesn't increment the EnterStackCount following a return to this point via a
longjmp.

Conflicts:
	src/libgap-api.h