Comments (9)
Thanks. I have no idea either. Happy to review a PR if you can find a solution. Sorry I can't be of more help here.
from winch.
libbacktrace should work:
- If DWARF < 5
- If there is a .dSYM for the executable
- Obviously if the exe is generated with debug
(so you have to use dsymutil to generate the .dSYM unless that is already done by the build)
I guess PPC might have bit-rotted with changes that have not been tested there yet (I have not had any Darwin-time recently and right now all effort is focussed on the GCC-13.1 and GCC-12.3 releases).
from winch.
Thanks. Is this a new error, or a regression? Did winch 0.0.12 or earlier versions work?
from winch.
Thanks. Is this a new error, or a regression? Did winch 0.0.12 or earlier versions work?
Let me try to run 0.0.12, I will update in a few minutes.
from winch.
@krlmlr Looks like the same failure on 0.0.12:
* checking files in ‘vignettes’ ... WARNING
Files in the 'vignettes' directory but no files in 'inst/doc':
‘report.Rmd’
* checking examples ... ERROR
Running examples in ‘winch-Ex.R’ failed
The error most likely occurred in:
> ### Name: winch_trace_back
> ### Title: Native stack trace
> ### Aliases: winch_trace_back
>
> ### ** Examples
>
> ## Don't show:
> if (winch_available()) (if (getRversion() >= "3.4") withAutoprint else force)({ # examplesIf
+ ## End(Don't show)
+ winch_trace_back()
+
+ foo <- function() {
+ winch_call(bar)
+ }
+
+ bar <- function() {
+ winch_trace_back()
+ }
+
+ foo()
+ ## Don't show:
+ }) # examplesIf
> winch_trace_back()
Error in winch_trace_back() : unw_getcontext() error: -1073785400
Calls: <Anonymous> ... source -> withVisible -> eval -> eval -> winch_trace_back
Execution halted
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
Running ‘example0.R’
ERROR
Running the tests in ‘tests/example0.R’ failed.
Last 13 lines of output:
>
> bar0 <- function() {
+ winch_call(baz0)
+ }
>
> baz0 <- function() {
+ winch_trace_back()
+ }
>
> if (winch_available()) {
+ foo0()
+ }
Error in winch_trace_back() : unw_getcontext() error: -1073785320
Calls: foo0 ... <Anonymous> -> winch_call -> <Anonymous> -> winch_trace_back
Execution halted
Maybe somewhere else PPC is missing, not only in macho.c
? I have only tried to fix it there, borrowing from https://github.com/ianlancetaylor/libbacktrace
Is the arch should be defined elsewhere too but is not, that would explain the error.
P. S. This is the minimum that is required: ianlancetaylor/libbacktrace@753968c
But I am not sure if something else missing.
from winch.
Thanks. I never actually tested on PPC, and I don't have the resources to investigate this.
Perhaps #65 could solve this? I have updated my fork, could you please copy over and run another test?
from winch.
@krlmlr I see that unw_getcontext
is sitting inside libunwind define. There is no fallback, right? I have no idea if libunwind works correctly for ppc. It builds, yeah, but that is all we know.
from winch.
@iains Iain, if you got a minute, could you please update us whether libbacktrace
should work on Darwin PPC? I saw that you have committed earlier to the source: ianlancetaylor/libbacktrace@753968c
Since then there were a number of updates to macho.c
.
Here we got an R
module which uses libbacktrace
. And tests fail on PPC (both canonical 10.6.8 Rosetta and 10A190 alike). Functionality seems to also rely on libunwind
– and I am not sure if it is supposed to work or not.
from winch.
This issue got buried under other, I just reran tests with the new R
and gcc13
, and it still fails (not to much of a surprise, just for the record):
R version 4.3.2 (2023-10-31) -- "Eye Holes"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: powerpc-apple-darwin10.0.0d2 (32-bit)
> library(winch)
>
> foo0 <- function() {
+ winch_call(bar0)
+ }
>
> bar0 <- function() {
+ winch_call(baz0)
+ }
>
> baz0 <- function() {
+ winch_trace_back()
+ }
>
> if (winch_available()) {
+ foo0()
+ }
Error in winch_trace_back() : unw_getcontext() error: -1073785224
Calls: foo0 ... <Anonymous> -> winch_call -> <Anonymous> -> winch_trace_back
Execution halted
from winch.
Related Issues (12)
- Provide C callable replacement for Rf_error() HOT 3
- Experiment with libunwind HOT 2
- Integrate into rlang? HOT 1
- Use getLoadedDLLs() HOT 2
- Performance of winch with testthat HOT 1
- add_trace_back doesn't work correctly on 32-bit systems HOT 6
- print backtrace on crash? HOT 1
- Revdep issue with vctrs HOT 6
- winch corrupts rlang backtraces HOT 9
- Update upstream libbacktrace sources HOT 3
- Fix r-universe build
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from winch.