Giter Club home page Giter Club logo

Comments (9)

krlmlr avatar krlmlr commented on July 28, 2024 1

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.

iains avatar iains commented on July 28, 2024 1

libbacktrace should work:

  1. If DWARF < 5
  2. If there is a .dSYM for the executable
  3. 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.

krlmlr avatar krlmlr commented on July 28, 2024

Thanks. Is this a new error, or a regression? Did winch 0.0.12 or earlier versions work?

from winch.

barracuda156 avatar barracuda156 commented on July 28, 2024

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.

barracuda156 avatar barracuda156 commented on July 28, 2024

@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.

krlmlr avatar krlmlr commented on July 28, 2024

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.

barracuda156 avatar barracuda156 commented on July 28, 2024

@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.

barracuda156 avatar barracuda156 commented on July 28, 2024

@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.

barracuda156 avatar barracuda156 commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.