| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
POSIX says: > The <signal.h> header shall define the siginfo_t type as a structure So <sys/wait.h> is not enough to see the definition (not just a forward declaration) of siginfo_t.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## master #7517 +/- ##
=======================================
Coverage 99.02% 99.02%
=======================================
Files 87 87
Lines 16803 16803
=======================================
Hits 16640 16640
Misses 163 163 ☔ View full report in Codecov by Sentry.
|
Sorry, something went wrong.
|
Generated via commit 3cc6658 Download link for the artifact containing the test results: ↓ atime-results.zip
|
Sorry, something went wrong.
I have used R CMD INSTALL ... to install this branch (in fact, I am not familiar with github, so I just downloaded the branch with zip file, unzip, and tar it to tarball). It works. Thanks a lot for your effect to fix it for FreeBSD. Thanks again. |
Sorry, something went wrong.
There was a problem hiding this comment.
Great!
Sorry, something went wrong.
|
Ironically, setting -D_POSIX_C_SOURCE=200809L makes gettimeofday invisible in FreeBSD 15 (indeed, POSIX.1-2008 marks it as obsolete, recommending clock_gettime() instead): user@freebsd:~ $ echo '#include <sys/time.h>' | cpp | grep gettimeofday int gettimeofday(struct timeval *, struct timezone *); user@freebsd:~ $ echo '#include <sys/time.h>' | cpp -D_POSIX_C_SOURCE=200809L | grep gettimeofday || echo not found not found We use gettimeofday in wallclock. (The code that wants to use clock_gettime() deprives itself of the opportunity by testing for #ifdef CLOCK_REALTIME before a header file can #define it. A fix to that will need to be careful not to reintroduce #5374.) Unlike _POSIX_C_SOURCE, which controls symbol visibility, _FORTIFY_SOURCE rewrites some function calls to perform stricter checks. Is the idea to make strict checks use #define _POSIX_C_SOURCE 200809L because it will hide non-standard or obsolete symbols? |
Sorry, something went wrong.
|
I'm just looking for a way to fortify our checks such that we would have caught this issue before release |
Sorry, something went wrong.
|
Then the strict checks must use --std=c99 to hide even more symbols, so that data.table could request some of them back using #define _POSIX_C_SOURCE=200809L: (Right now the only failure is the -vanilla test, due to the C locale.) Should I push f02dcb7 to this branch? Drat. R itself uses configure-time tests for C23 features in R_ext/Rboolean.h, so when we later request C99 compatibility, this causes annoying warnings (because the configure-time tests aren't updated). |
Sorry, something went wrong.
|
Since we need to patch 1.18.2 soon, I would be in favor to merge this and check afterwards if new errors pop up (I know this is not ideal) |
Sorry, something went wrong.
* utils.c: include <signal.h> for siginfo_t POSIX says: > The <signal.h> header shall define the siginfo_t type as a structure So <sys/wait.h> is not enough to see the definition (not just a forward declaration) of siginfo_t. * NEWS entry * Amend NEWS * more robustly define _POSIX_C_SOURCE (h/t Hugh) * tidy up NEWS * -D_POSIX_C_SOURCE=200809L in gitlab CI job for regression test * revert gitlab-ci change --------- Co-authored-by: Michael Chirico <michaelchirico4@gmail.com> Co-authored-by: Michael Chirico <chiricom@google.com>
|
Also cherry-picked to the 1.18.2 patch: 20e25d1 |
Sorry, something went wrong.
|
|
||
| 6. `rowwiseDT()` now provides a helpful error message when a complex object that is not a list (e.g., a function) is provided as a cell value, instructing the user to wrap it in `list()`, [#7219](https://github.com/Rdatatable/data.table/issues/7219). Thanks @kylebutts for the report and @venom1204 for the fix. | ||
|
|
||
| 7. Fixed compilation failure like "error: unknown type name 'siginfo_t'" in v1.18.0 in some strict environments, e.g., FreeBSD, where the header file declaring the POSIX function `waitid` does not transitively include the header file defining the `siginfo_t` type, [#7516](https://github.com/rdatatable/data.table/issues/7516). Thanks to @jszhao for the report and @aitap for the fix. |
There was a problem hiding this comment.
Very minor: the underscore in "error: unknown type name 'siginfo_t'" is an unpaired emphasis mark. This doesn't confuse Pandoc or commonmark, but makes the Vim syntax highlighter unhappy. Some variation on "error: unknown type name 'siginfo\_t'" or "error: unknown type name `siginfo_t`" would be slightly better.
Sorry, something went wrong.
There was a problem hiding this comment.
I would prefer `error: unknown type name 'siginfo_t'` to keep it human-readable too
Sorry, something went wrong.
* 1.18.0 on CRAN. Bump to 1.18.99 * bump versions * Fix milestone link for 1.18.2 * Replace `ATTRIB`, `SET_ATTRIB` (#7487) * frev: drop SET_ATTRIB Instead, backport and use CLEAR_ATTRIB (R >= 4.5). * mergeIndexAttrib: drop SET_ATTRIB Use SHALLOW_DUPLICATE_ATTRIB (R >= 3.3) for the simple case. Also, Backport ANY_ATTRIB (R >= 4.5) instead of testing !isNull(ATTRIB(.)). * cbindlist: use ANY_ATTRIB * nafillR: use ANY_ATTRIB * Backport R_mapAttrib * anySpecialStatic: switch to R_mapAttrib * dogroups: construct rownames anew Instead of trying to walk ATTRIB in search of the compact 'rownames' attribute to modify, install it anew, take note of the returned reference to the value being installed (a different one!) and modify that. * mergeIndexAttrib: switch to R_mapAttrib * assign: factor out index fixup Instead of walking the attribute list directly, use R_mapAttrib(). Create a hash table of index names instead of relying on chin() and a temporary string vector. Move all temporary allocations onto the R heap. * assign: drop indexLength * assign: fix index unmarking * Comments, better field names * Update src/dogroups.c Co-authored-by: Benjamin Schwendinger <52290390+ben-schwen@users.noreply.github.com> * mapAttrib: protect the attribute value Otherwise the callback could remove the attribute and end up with the value unprotected. Protect the attribute tag as well for uniformity. Co-Authored-By: HughParsonage <hugh.parsonage@gmail.com> * dogroups: look up rownames using mapAttrib This solution is closer to the working approach previously taken by the code. * Fix comment, function name * Protect the newly found rownames attribute * add NEWS entry --------- Co-authored-by: HughParsonage <hugh.parsonage@gmail.com> Co-authored-by: Benjamin Schwendinger <52290390+ben-schwen@users.noreply.github.com> Co-authored-by: Michael Chirico <chiricom@google.com> Co-authored-by: Michael Chirico <michaelchirico4@gmail.com> * use getVar over findVar (#7575) * remove unused vars (#7578) * Fix code blocks in NEWS.md (#7518) Add a missing triple-backtick separator. Separate the indented code blocks from the preceding paragraph because otherwise Pandoc fails to realise that the whitespace followed by triple-backtick denotes a fenced code block. * make rchk happy (#7520) Co-authored-by: Michael Chirico <chiricom@google.com> * escape one frollsd tests for valgrind (#7548) * escape one tests for valgrind * increment skipped count * escape proper one * make test robust to valgrind numerical issues --------- Co-authored-by: Michael Chirico <michaelchirico4@gmail.com> * fix(7571): bug fix for narm issue on gforce in int64 case (#7572) * fix(7571): bug fix for narm issue on gforce in int64 case * fix(7571): test sequencing * fix(7571): updated the NEWS.md * trailing newline * Use $V1 * fix(7571): added db optimize 2L * refine NEWS * fix(7571): add more tests and change to code similar to int for gsum * fix(7571): added more tests for mean * eliminate intermediate variable * NEWS again --------- Co-authored-by: Michael Chirico <chiricom@google.com> * add @manmita (#7573) * `utils.c`: include `<signal.h>` for `siginfo_t` (#7517) * utils.c: include <signal.h> for siginfo_t POSIX says: > The <signal.h> header shall define the siginfo_t type as a structure So <sys/wait.h> is not enough to see the definition (not just a forward declaration) of siginfo_t. * NEWS entry * Amend NEWS * more robustly define _POSIX_C_SOURCE (h/t Hugh) * tidy up NEWS * -D_POSIX_C_SOURCE=200809L in gitlab CI job for regression test * revert gitlab-ci change --------- Co-authored-by: Michael Chirico <michaelchirico4@gmail.com> Co-authored-by: Michael Chirico <chiricom@google.com> * Remove unrelated release notes Amend 1c05f11: remove the notes not relevant to the 1.18.2 release. * Fix http -> https link that is now a redirect (#7588) Found the following (possibly) invalid URLs: URL: http://stereopsis.com/radix.html (moved to https://stereopsis.com/radix.html) From: man/setkey.Rd man/setorder.Rd Status: 200 Message: OK * Fix latest rchk issues (#7585) * attempt PROTECT for new rchk issues * different approach for longestLevels * use nprotect? * no longer using names SEXP * only UNPROTECT near exit * no, that cant be it... * move assignment into loop * REPROTECT approach * reduce diff * reduce diff * set automatically allocates new column slots if needed (#7538) * set automatically allocates new column slots if needed * use GetOption1 instead of GetOption * fix test * change froll test * remove assign change * add output statements to test loop * add helper function * frollmedianFast: avoid reading uninitialised array (#7589) The 'n' array is only initialised if 'even' is true, so skip the comparisons otherwise. Detected by checking with --use-valgrind or performing a frollmedian() with an odd window size under R -d valgrind. Fixes: #7546 * `setlevels()`: avoid crash on missing factor values (#7596) Check for missing or out of bounds values and set them to NA. * Avoid out-of-bounds access in `overlaps` (#7598) * Add tests * overlaps: avoid accessing length-0 vectors in ux If 'ux' contains 0 rows, pretend that all comparisons against its non-existent elements fail. * overlaps: avoid 'lookup' list overflow This used to happen when from[i] was 0. (No match on non-range columns?) * NEWS entry * overlaps: uncomment one more underflow test Technically this one was harmless (and thus not caught by sanitizers) because the preceding VECSEXP header always contained a 0, preventing the branch where VECTOR_ELT() would be called with a negative index. * test formatting * Update src/ijoin.c Co-authored-by: Benjamin Schwendinger <52290390+ben-schwen@users.noreply.github.com> * Update src/ijoin.c Co-authored-by: Benjamin Schwendinger <52290390+ben-schwen@users.noreply.github.com> * Update src/ijoin.c Co-authored-by: Benjamin Schwendinger <52290390+ben-schwen@users.noreply.github.com> * Update inst/tests/tests.Rraw * overlaps: uncomment the remaining underflow test The underflow is covered by already existing tests. --------- Co-authored-by: Benjamin Schwendinger <52290390+ben-schwen@users.noreply.github.com> * Only export R_init_data_table (#7607) This will avoid name clashes between data.table functions (now hidden) and other functions in the global namespace visible to the shared library loader. Fixes: #7605 * `set()`: only reallocate the table if resizing would fail otherwise (#7606) * Regression tests * set(): only reallocate if resizing would fail * Update R/data.table.R Co-authored-by: Michael Chirico <chiricom@google.com> * Rename test variables Co-Authored-By: Michael Chirico <michaelchirico4@gmail.com> * Cache j %chin% names(x) Co-Authored-By: Benjamin Schwendinger <52290390+ben-schwen@users.noreply.github.com --------- Co-authored-by: Michael Chirico <chiricom@google.com> Co-authored-by: Michael Chirico <michaelchirico4@gmail.com> * NEWS entry for #7607 (#7608) * NEWS entry for #7607 * More about the problem being solved Co-Authored-By: Benjamin Schwendinger <52290390+ben-schwen@users.noreply.github.com> * `tests/froll.R`: disable `mcparallel` under Valgrind (#7621) * update NEWS * fix merge --------- Co-authored-by: Tyson Barrett <t.barrett88@gmail.com> Co-authored-by: aitap <krylov.r00t@gmail.com> Co-authored-by: HughParsonage <hugh.parsonage@gmail.com> Co-authored-by: Michael Chirico <chiricom@google.com> Co-authored-by: Michael Chirico <michaelchirico4@gmail.com> Co-authored-by: Jan Gorecki <J.Gorecki@wit.edu.pl> Co-authored-by: Manmita Das <34617961+manmita@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
POSIX says:
So <sys/wait.h> is not enough to see the definition (not just a forward declaration) of siginfo_t.
Fixes: #7516
Tested manually on FreeBSD:
Details$ R CMD check data.table_1.18.99.tar.gz --no-manual * using R version 4.5.1 (2025-06-13) * using platform: amd64-portbld-freebsd15.0 * R was compiled by FreeBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd708029e0b2) GNU Fortran (FreeBSD Ports Collection) 13.3.0 * running under: FreeBSD freebsd 15.0-RELEASE FreeBSD 15.0-RELEASE releng/15.0-n280995-7aedc8de6446 GENERIC amd64 * checking whether package ‘data.table’ can be installed ... OK * used C compiler: ‘FreeBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd708029e0b2)’ * checking compiled code ... NOTE File ‘data.table/libs/data_table.so’: Found non-API calls to R: ‘IS_GROWABLE’, ‘LEVELS’, ‘SETLENGTH’, ‘SET_GROWABLE_BIT’, ‘SET_TRUELENGTH’, ‘TRUELENGTH’, ‘XTRUELENGTH’ Status: 1 NOTE...and OpenBSD:
Details$ LANG=C.UTF-8 R CMD check data.table_1.18.99.tar.gz --no-manual * R was compiled by egcc (GCC) 8.4.0 GNU Fortran (GCC) 8.4.0 * running under: OpenBSD openbsd.my.domain 7.8 GENERIC#54 amd64 * checking whether package ‘data.table’ can be installed ... OK * used C compiler: ‘OpenBSD clang version 19.1.7’ Status: OKAlso tested on GNU/Linux with PKG_CFLAGS=--std=c99.
@jszhao, could you please pull from this branch (posix_siginfo_t) and run R CMD build, then install the resulting tarball?