Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
b6a449dd by Raymond Toy at 2024-07-25T13:16:27+00:00
Fix #341: Update version features in cross-compile scripts
- - - - -
5ad8c86e by Raymond Toy at 2024-07-25T13:16:29+00:00
Merge branch 'issue-341-update-version-feature-for-xcompile' into 'master'
Fix #341: Update version features in cross-compile scripts
Closes #341
See merge request cmucl/cmucl!238
- - - - -
6 changed files:
- src/tools/cross-scripts/cross-x86-netbsd.lisp
- src/tools/cross-scripts/cross-x86-osx-freebsd.lisp
- src/tools/cross-scripts/cross-x86-osx-solaris.lisp
- src/tools/cross-scripts/cross-x86-ppc-darwin.lisp
- src/tools/cross-scripts/cross-x86-sparc.lisp
- src/tools/cross-scripts/cross-x86-x86.lisp
Changes:
=====================================
src/tools/cross-scripts/cross-x86-netbsd.lisp
=====================================
@@ -22,7 +22,7 @@
:conservative-float-type
:hash-new
:random-mt19937
- :cmu :cmu20 :cmu20a ; Version features
+ :cmu :cmu21 :cmu21e ; Version features
:double-double ; double-double float support
)
;; Features to remove from current *features* here. Normally don't
=====================================
src/tools/cross-scripts/cross-x86-osx-freebsd.lisp
=====================================
@@ -26,7 +26,7 @@
:complex-fp-vops
:hash-new
:random-mt19937
- :cmu :cmu20 :cmu20b ; Version features
+ :cmu :cmu21 :cmu21e ; Version features
:double-double ; double-double float support
:linkage-table
=====================================
src/tools/cross-scripts/cross-x86-osx-solaris.lisp
=====================================
@@ -26,7 +26,7 @@
:complex-fp-vops
:hash-new
:random-mt19937
- :cmu :cmu20 :cmu20b ; Version features
+ :cmu :cmu21 :cmu21e ; Version features
:double-double ; double-double float support
:linkage-table
=====================================
src/tools/cross-scripts/cross-x86-ppc-darwin.lisp
=====================================
@@ -17,7 +17,7 @@
:darwin ; Darwin OS (Mac OS X)
:bsd ; We're a BSD-type OS
:cmu ; Announce this is CMUCL
- :cmu20 :cmu20a ; (Mostly) current version identifier
+ :cmu21 :cmu21e ; (Mostly) current version identifier
:gencgc ; Generational GC is supported on ppc.
:relative-package-names
:modular-arith ; Modular arithmetic
=====================================
src/tools/cross-scripts/cross-x86-sparc.lisp
=====================================
@@ -23,7 +23,7 @@
:hash-new
:random-mt19937 ; MT-19937 generator
:cmu ; Announce this is CMUCL
- :cmu20 :cmu20b ; Current version identifier
+ :cmu21 :cmu21e ; Current version identifier
:modular-arith ; Modular arithmetic
:double-double ; Double-double float support
:executable
=====================================
src/tools/cross-scripts/cross-x86-x86.lisp
=====================================
@@ -21,7 +21,7 @@
:conservative-float-type
:hash-new
:random-xoroshiro ; RNG
- :cmu :cmu20 :cmu20a ; Version features
+ :cmu :cmu21 :cmu21e ; Version features
:double-double ; double-double float support
)
;; Features to remove from current *features* here. Normally don't
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/4e53aac53e3eccd52072c5…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/4e53aac53e3eccd52072c5…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
8e31e57e by Raymond Toy at 2024-07-25T13:15:44+00:00
Fix #342: Add CI to run static analyzer on C code
- - - - -
4e53aac5 by Raymond Toy at 2024-07-25T13:15:50+00:00
Merge branch 'issue-342-add-ci-static-analyzer' into 'master'
Fix #342: Add CI to run static analyzer on C code
Closes #342
See merge request cmucl/cmucl!239
- - - - -
1 changed file:
- .gitlab-ci.yml
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -10,6 +10,7 @@ stages:
- test
- ansi-test
- benchmark
+ - analyze
cache:
@@ -36,7 +37,7 @@ linux:build:
- dist/
- linux-2/*.log
- linux-3/*.log
- - linux-4/*.log
+ - linux-4/
needs:
- job: linux:install
artifacts: true
@@ -45,8 +46,10 @@ linux:build:
#- bin/create-target.sh xtarget x86_linux_clang
#- bin/create-target.sh xcross x86_linux_clang
#- bin/cross-build-world.sh -crl -B boot-2020-04-1 xtarget xcross src/tools/cross-scripts/cross-x86-x86.lisp snapshot/bin/lisp
- # Regular build using the cross-compiled result or snapshot
- - bin/build.sh $bootstrap -R -C "x86_linux_clang" -o snapshot/bin/lisp
+ # Regular build using the cross-compiled result or snapshot. The
+ # analyzer job requires gcc, so make sure we build with gcc here
+ # instead of clang.
+ - bin/build.sh $bootstrap -R -C "x86_linux" -o snapshot/bin/lisp
# - bin/build.sh $bootstrap -R -C "x86_linux" -o snapshot/bin/lisp
# Use -V to specify the version in case some tag makes git
# describe return something that make-dist.sh doesn't like.
@@ -62,6 +65,8 @@ linux:cross-build:
- linux-2/*.log
- linux-3/*.log
- linux-4/*.log
+ # The lisp directory is needed for the static analyzer job.
+ - linux-4/lisp
needs:
# Normally need the linux:install stage to get the compiler to
@@ -232,3 +237,24 @@ osx:benchmark:
- CMUCL=../../snapshot/bin/lisp ./run-cmucl.sh
- CMUCL=../../dist/bin/lisp ./run-cmucl.sh
- ../../snapshot/bin/lisp -load report
+
+# Optional job that runs the static analyzer. It needs the files from
+# the linux-4 directory built in the linux:build job.
+linux:static-analyzer:
+ stage: analyze
+ when: manual
+ tags:
+ - linux
+ artifacts:
+ paths:
+ - analyzer.log
+ needs:
+ - job: linux:build
+ artifacts: true
+ script:
+ # Analysis can generate huge amounts of output. For now just save
+ # the results to the log file instead of also having it go to the
+ # console. If someday there's less or no output, we can consider
+ # having the logs go to the console too.
+ - make -C linux-4/lisp clean
+ - make -C linux-4/lisp CFLAGS=-fanalyzer > analyzer.log 2>&1
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/1b3171cd466a03aca50ff2…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/1b3171cd466a03aca50ff2…
You're receiving this email because of your account on gitlab.common-lisp.net.
Carl Shapiro pushed to branch master at cmucl / cmucl
Commits:
0319c582 by Carl Shapiro at 2024-04-28T12:05:17-07:00
Abort if make_var cannot allocate memory with malloc
There are two calls to malloc in this function. Previously, just the
first checked for an error. This change adds a similar check to the
second call.
- - - - -
1b3171cd by Carl Shapiro at 2024-07-25T07:12:17+00:00
Merge branch 'vars-c-unchecked-malloc' into 'master'
Abort if make_var cannot allocate memory with malloc
See merge request cmucl/cmucl!216
- - - - -
1 changed file:
- src/lisp/vars.c
Changes:
=====================================
src/lisp/vars.c
=====================================
@@ -128,6 +128,10 @@ make_var(char *name, boolean perm)
name = buffer;
}
var->name = (char *) malloc(strlen(name) + 1);
+ if (var->name == NULL) {
+ perror("malloc");
+ exit(1);
+ }
strcpy(var->name, name);
var->clock = 0;
var->permanent = perm;
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/1b1695810a359432b0be43…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/1b1695810a359432b0be43…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-342-add-ci-static-analyzer at cmucl / cmucl
Commits:
d2437978 by Raymond Toy at 2024-07-24T14:09:40-07:00
Don't log the analyzer output to the console.
As the comment says, there can be huge amounts of output so just save
everything in the log file for later viewing. Currently, the log to
the console stops in the pipeline viewer anyway, so no need to do that.
- - - - -
1 changed file:
- .gitlab-ci.yml
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -252,5 +252,9 @@ linux:static-analyzer:
- job: linux:build
artifacts: true
script:
+ # Analysis can generate huge amounts of output. For now just save
+ # the results to the log file instead of also having it go to the
+ # console. If someday there's less or no output, we can consider
+ # having the logs go to the console too.
- make -C linux-4/lisp clean
- - make -C linux-4/lisp CFLAGS=-fanalyzer 2>&1 | tee analyzer.log
+ - make -C linux-4/lisp CFLAGS=-fanalyzer > analyzer.log 2>&1
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/d243797816fd89c6ce7c82e…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/d243797816fd89c6ce7c82e…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-342-add-ci-static-analyzer at cmucl / cmucl
Commits:
908c2ef1 by Raymond Toy at 2024-07-24T09:58:44-07:00
Do linux build with gcc instead of clang.
Currently the analyzer job requires gcc (because we use `-fanalyzer`
instead `-Xanalyzer` for clang). Perhaps that should be changed some
day.
- - - - -
1 changed file:
- .gitlab-ci.yml
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -46,8 +46,10 @@ linux:build:
#- bin/create-target.sh xtarget x86_linux_clang
#- bin/create-target.sh xcross x86_linux_clang
#- bin/cross-build-world.sh -crl -B boot-2020-04-1 xtarget xcross src/tools/cross-scripts/cross-x86-x86.lisp snapshot/bin/lisp
- # Regular build using the cross-compiled result or snapshot
- - bin/build.sh $bootstrap -R -C "x86_linux_clang" -o snapshot/bin/lisp
+ # Regular build using the cross-compiled result or snapshot. The
+ # analyzer job requires gcc, so make sure we build with gcc here
+ # instead of clang.
+ - bin/build.sh $bootstrap -R -C "x86_linux" -o snapshot/bin/lisp
# - bin/build.sh $bootstrap -R -C "x86_linux" -o snapshot/bin/lisp
# Use -V to specify the version in case some tag makes git
# describe return something that make-dist.sh doesn't like.
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/908c2ef11429ef7f9ace870…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/908c2ef11429ef7f9ace870…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-306-lisp.c at cmucl / cmucl
Commits:
74311063 by Raymond Toy at 2024-07-24T09:35:29-07:00
Handle leak of searched_core
The initial fix of just returning NULL when `core` is NULL or when
`core` is not accessible like so:
```
if (core && access(core, R_OK) != 0) {
return NULL;
}
```
fixed the analyzer warning that we were leaking `core`.
I think the analyzer is wrong here. If `core` was set by
`search_core` but it is inaccessible, we'd return NULL without freeing
the space returned by search_core.
Instead we do this so that we the searched core is NULL or if it's not
accessible, we free the space before returning. This also fixes the
analyzer warning.
- - - - -
1 changed file:
- src/lisp/lisp.c
Changes:
=====================================
src/lisp/lisp.c
=====================================
@@ -442,16 +442,24 @@ fpu_mode_t fpu_mode = SSE2;
static const char*
locate_core(const char* cmucllib, const char* core, const char* default_core)
{
+ char* searched_core = NULL;
+
if (core == NULL) {
if (getenv("CMUCLCORE") == NULL) {
- core = search_core(cmucllib, default_core);
+ searched_core = search_core(cmucllib, default_core);
+ core = searched_core;
} else {
core = getenv("CMUCLCORE");
}
}
- if (core && access(core, R_OK) != 0) {
- return NULL;
+ if (core) {
+ if (access(core, R_OK) != 0) {
+ if (searched_core) {
+ free(searched_core);
+ }
+ return NULL;
+ }
}
return core;
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/743110632996741b9d8f051…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/743110632996741b9d8f051…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-306-lisp.c at cmucl / cmucl
Commits:
11b0847b by Raymond Toy at 2024-07-24T09:15:12-07:00
Add check_ptr(cmucllib,...)
Make sure that cmucllib is not NULL after we gone through all the
cases to determine a value for cmucllib.
- - - - -
ab21364d by Raymond Toy at 2024-07-24T09:20:31-07:00
Handle leak of searched_core
The initial fix of just returning NULL when `core` is NULL or when
`core` is not accessible like so:
```
if (core && access(core, R_OK) != 0) {
return NULL;
}
```
fixed the analyzer warning that we were leaking `core`.
I think the analyzer is wrong here. If `core` was set by
`search_core` but it is inaccessible, we'd return NULL without freeing
the space returned by search_core.
Instead we do this so that we the searched core is NULL or if it's not
accessible, we free the space before returning. This also fixes the
analyzer warning.
- - - - -
1 changed file:
- src/lisp/lisp.c
Changes:
=====================================
src/lisp/lisp.c
=====================================
@@ -451,7 +451,7 @@ locate_core(const char* cmucllib, const char* core, const char* default_core)
}
if (core && access(core, R_OK) != 0) {
- core = NULL;
+ return NULL;
}
return core;
@@ -789,6 +789,8 @@ main(int argc, const char *argv[], const char *envp[])
}
}
+ check_ptr(cmucllib, "cmucllib must not be NULL");
+
/* Only look for a core file if we're not using a built-in image. */
if (builtin_image_flag == 0) {
/*
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/a21feb6f05bde430f56c88…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/a21feb6f05bde430f56c88…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-306-lisp.c at cmucl / cmucl
Commits:
a21feb6f by Raymond Toy at 2024-07-24T08:49:54-07:00
Use sprintf instead of strcpy/strcat (in default_cmucllib)
- - - - -
1 changed file:
- src/lisp/lisp.c
Changes:
=====================================
src/lisp/lisp.c
=====================================
@@ -164,9 +164,8 @@ default_cmucllib(const char *argv0arg)
if (argv0_dir[0] == '/') {
cwd = malloc(strlen(argv0_dir) + 2);
check_ptr(cwd, "No space to duplicate argv0");
-
- strcpy(cwd, argv0_dir);
- strcat(cwd, "/");
+
+ sprintf(cwd, "%s/", argv0_dir);
if (debug_lisp_search) {
fprintf(stderr, "absolute path, argv[0] = %s\n", cwd);
}
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/a21feb6f05bde430f56c880…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/a21feb6f05bde430f56c880…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-342-add-ci-static-analyzer at cmucl / cmucl
Commits:
ba336a85 by Raymond Toy at 2024-07-24T08:32:54-07:00
Need to save all of linux-4 in linux:build for analyzer
The analyzer job needs linux-4 files from linux:build stage to run the
analyzer. Update the artifacts list to include linux-4 instead of
just linux-4/*.log
- - - - -
1 changed file:
- .gitlab-ci.yml
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -37,7 +37,7 @@ linux:build:
- dist/
- linux-2/*.log
- linux-3/*.log
- - linux-4/*.log
+ - linux-4/
needs:
- job: linux:install
artifacts: true
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/ba336a8531775394aee9559…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/ba336a8531775394aee9559…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-342-add-ci-static-analyzer at cmucl / cmucl
Commits:
5ca1d65f by Raymond Toy at 2024-07-24T07:07:29-07:00
Just make analyzer job completely optional
Let's not try running this job when pipelines are scheduled. The
pipeline was failing with the message
> linux:static-analyzer' job needs 'linux:build' job, but 'linux:build' is not in any previous stage
Not yet sure how to fix that.
- - - - -
1 changed file:
- .gitlab-ci.yml
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -236,15 +236,11 @@ osx:benchmark:
- CMUCL=../../dist/bin/lisp ./run-cmucl.sh
- ../../snapshot/bin/lisp -load report
-# Optional job that runs the static analyzer. Either manually start
-# it or let it run automatically when scheduled pipelines run.
-# It needs the files from the linux-4 directory built in the
-# linux:build job.
+# Optional job that runs the static analyzer. It needs the files from
+# the linux-4 directory built in the linux:build job.
linux:static-analyzer:
stage: analyze
- rules:
- - if: $CI_PIPELINE_SOURCE == "schedule"
- - when: manual
+ when: manual
tags:
- linux
artifacts:
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/5ca1d65ffc28b17cd3c81be…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/5ca1d65ffc28b17cd3c81be…
You're receiving this email because of your account on gitlab.common-lisp.net.