Skip to content

Commit 065b5a8

Browse files
committed
Test segfaulting with brms
1 parent 6cbb647 commit 065b5a8

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,16 @@ jobs:
106106
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
107107
shell: Rscript {0}
108108

109+
- name: Check brms segfault
110+
env:
111+
run: |
112+
install.packages("brms")
113+
library(brms)
114+
library(cmdstanr)
115+
fit <- cmdstan_example("schools", force_recompile = TRUE)
116+
fit$init_model_methods(verbose = TRUE)
117+
shell: Rscript {0}
118+
109119
- name: Show testthat output
110120
if: always()
111121
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true

inst/include/model_methods.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef STAN_THREADS
2+
#define STAN_THREADS
3+
#endif
14
#include <stan/model/model_base.hpp>
25
#include <stan/model/log_prob_grad.hpp>
36
#include <stan/model/log_prob_propto.hpp>

0 commit comments

Comments
 (0)