Segfault when using unit_vector and softmax

Hi I am getting a segfault when I try to run the following simple model with rstan:

parameters {
  vector[2] theta_link;
  unit_vector[3] mu_vec;
}
model {
  target += log(softmax(theta_link));
}

When I remove the unit_vector[3] mu_vec line, I no longer get the segfault.

Here is the error message:

 *** caught segfault ***
address 0x29, cause 'memory not mapped'

Traceback:
 1: .External(list(name = "CppMethod__invoke_notvoid", address = <pointer: 0x555b8ff2bb90>,     dll = list(name = "Rcpp", path = "/home/satya/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/libs/Rcpp.so",         dynamicLookup = TRUE, handle = <pointer: 0x555b94139f30>,         info = <pointer: 0x555b8f097850>), numParameters = -1L),     <pointer: 0x555b956da850>, <pointer: 0x555b8fc0cae0>, .pointer,     ...)
 2: sampler$call_sampler(args_list[[i]])
 3: doTryCatch(return(expr), name, parentenv, handler)
 4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 5: tryCatchList(expr, classes, parentenv, handlers)
 6: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call)[1L]        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        sm <- strsplit(conditionMessage(e), "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if (is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && isTRUE(getOption("show.error.messages"))) {        cat(msg, file = outFile)        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
 7: try(sampler$call_sampler(args_list[[i]]))
 8: .local(object, ...)
 9: sampling(model, chains = 1)
10: sampling(model, chains = 1)
An irrecoverable exception occurred. R is aborting now ...

Which OS and version of R?

The OS is Ubuntu 20.04 with R version 4.0.2 (2020-06-22), rstan (Version 2.21.2, GitRev: 2e1f913d3ca3).

I did a little bit more investigation. The segfault went away when I compiled and reinstalled rstan.