Debian Patches

Status for sphde/1.4.0-5

Patch Description Author Forwarded Bugs Origin Last update
0001-Ignore-some-tests.patch Ignore some tests
For buildd, we need to skip some tests that fail on powerpc. Specifically :
- src/sphgettime_t and src/sphgtod_t still fail and can be ignored for
now as they compare the time taken with a constant value.
- src/sphdirectpcqueue_ttt takes hours to complete.
=?utf-8?b?RnLDqWTDqXJpYyBCb25uYXJk?= <> no 2018-07-23
0002-Fix-compilation-error-with-gcc8.patch Fix compilation error with gcc8
gcc8 gives error as
tests/sassim_t.c:153:12: error: passing argument 1 to restrict-qualified
parameter aliases with argument 3 [-Werror=restrict]
sprintf ((char *) baseAddr1, "SAS Page 0@%p", baseAddr1);
tests/sassim_t.c:158:7: error: passing argument 1 to restrict-qualified
parameter aliases with argument 4 [-Werror=restrict]
sprintf (pageX_ptr, "SAS Page %ld@%p", page_num, pageX_ptr);

If the buffer pointed is same as argument passed to sprintf, gcc8
gives compilation error.
Handled it by passing temporary pointers to sprintf.
Rajalakshmi Srinivasaraghavan <> no 2018-08-01
0003-Adjust-sasconf-for-mips64el.patch Adjust sasconf for mips64el
Defines base address, region and segment size for mips64el.

2016-12-01 Radovan Birdic <>

* src/sasconf.h: Define address for mips64el.
* src/sassim.cpp: Adjust struct logNodeType.
Radovan Birdic <> no 2016-12-01
0004-Add-mips32-support-for-mips-and-mipsel.patch Add mips32 support for mips and mipsel
Radovan : We need to define proper addresses (__SAS_BASE_ADDRESS,
RegionSize, SegmentSize and __SAS_SHMAP_MAX) for mips/mipsel into
"sasconf.h" file.

Modified the patch because of failure to build on mips64el with gcc8 :
In file included from sasutil.c:21:

sasconf.h:105: error: "__SAS_BASE_ADDRESS" redefined [-Werror]
# define __SAS_BASE_ADDRESS 0x60000000UL /* 1,5GB */

sasconf.h:98: note: this is the location of the previous definition
# define __SAS_BASE_ADDRESS 0x4000000000L /* 256GB */

sasconf.h:106: error: "RegionSize" redefined [-Werror]
# define RegionSize 0x10000000UL /* 256MB */

sasconf.h:99: note: this is the location of the previous definition
# define RegionSize 0x2000000000L /* 128GB */
=?utf-8?b?RnLDqWTDqXJpYyBCb25uYXJk?= <> no 2018-08-10
0005-Fix-FTBFS-on-s390x.patch Fix FTBFS on s390x
In last upstream version, HTM related code has changed and fails on
s390x. This is a attempt to fix things basically.
=?utf-8?b?RnLDqWTDqXJpYyBCb25uYXJk?= <> no 2018-08-21
0006-Fix-this-pointer-null-warning-for-GCC11.patch Fix "'this' pointer null" warning for GCC11.
The initRegion function of sassim.cpp initializes a number of
uLongTreeNode lists. Normally uLongTreeNode lists can be empty
(root pointer NULL) at any time. This is handled internally
(correctly) even in the case of NULL "this" (insert does not depend
on "this" and uses the explicite "**root" parameter.

For SPHDE initRegion is the only place where the compiler can use
static analisis to detect "'this' pointer null". This is persistent
storage so normal operator new and constructor rules do not apply.
So we expose the internals of uLongTreeNode to sassim and provide a
static inline function to: SAS allocate and initialize a
uLongTreeNode with key/value. and store that point in the root.

* src/sassim.cpp (initULTreeList): New function.
(initRegion): replace insertNode call with initULTreeList,
for lists uncommitted and region.
Steven Munroe <> no 2020-07-22
0007-Add-operator-new-delete-to-uLongTreeNode-class.patch Add operator new/delete to uLongTreeNode class.
Further cleanup from GCC11 warning issue.

* src/ultree.h: Include <stddef.h>.
(uLongTreeNode, ~uLongTreeNode): New default CTOR/DTOR.
(uLongTreeNode (search_t, info_t)): New Node init CTOR.
(operator new, operator delete): New public members.
Reformat source.
* src/ultree.cpp (operator new, operator delete) New member
implementation using SASNearAlloc and SASNearDealloc.

* src/sassim.cpp (initULTreeList) Function removed.
(initRegion): Replace initULTreeList call with new operator
and ctor, for anchor->uncommitted and anchor->region.
[__SASDebugPrint__]: Conditionally add sas_printf for
"initRegion uncommitted list" and "initRegion region list".
Steven Munroe <> no 2020-08-03
0008-Suppress-bogus-array-bounds-warning-with-GCC-12.patch Suppress bogus array-bounds warning with GCC 12
Building with GCC 12 is causing many errors like:

sphde/src/sassim.cpp:711:16: error: array subscript 0 is outside array bounds of
'SASBlockHeader [0]' [-Werror=array-bounds]
711 | anchorBlock->special = anchorBlock + 1;
| ~~~~~~~~~~~~~^~~~~~~

All related to anchorBlock and anchor in src/sassim.cpp:initRegion(). These look
like false-positives because anchorBlock is initialized to a fixed memory
address defined by memLow, and anchor is derived from that as well.

A similar issue with constant addresses has been reported as GCC bug 101379, in
which GCC developers advise to suppress this warning for now.

Tested with GCC 12.0.0 (20210713) and 10.2.1.
Matheus Castanho <> no 2021-07-13
0009-Fixes-for-build-test-failure-61.patch Fixes for build test failure 61.
As SPHDE builds fortify (__FORTIFY_SOURCE), test cases using
SASAllocateShmID may fail because a const is used as the shared
memory address passed to SASAllocateShmID then passed to memset.
So create a second version SASAllocateShmID_clear where memset
is called after successful shmat and using the returned point.
Use the new SASAllocateShmID_clear for the failure cases and remove
the memset call.

* src/sasshm.c (SASAllocateShmID_clear): New function.
* src/sasshm.h (SASAllocateShmID_clear): New extern.

* src/tests/sascompoundheap_t.c
(sassim_compound_heap_test1): Replace SASAllocateShmID call
with SASAllocateShmID_clear.
* src/tests/sassim_t.c (sassim_heap_test2):
Replace SASAllocateShmID call with SASAllocateShmID_clear.
Steven Munroe <> no 2021-11-09

All known versions for source package 'sphde'