Git Product home page Git Product logo

Comments (1)

dtrace4linux avatar dtrace4linux commented on May 17, 2024

Thanks Apurba for these two fixes. The second fix is suboptimal, so have
put in the same fix i did for x86_64; the first one I could not reproduce
on my 12.04 VM, but I have put it in anyhow.

Thanks for pointing out the latter issue - I was wondering why it was core
dumping during the usdt test.

On 10 December 2012 05:43, Apurba [email protected] wrote:

building on 32 bit ubuntu 12.04 complains about unavailable values at
intr.c:694 and generates core dump at dt_module.c:992.

I am not an expert, but the below patch works for me.

The code seems to declare gate_t as gate64 or gate32, but this block uses
gate64 fields which are not available on my 32 bit machine. If I patch
--- a/driver/intr.c
+++ b/driver/intr.c
@@ -694,10 +694,14 @@ dtrace_write_idt_entry2(int vec)

info[0].vector = vec;
info[0].address = gate_offset(*val);

  • // AN we do not have these for 32 bits +#ifndef __i386 info[0].cs =
    gate_segment(*val); info[0].flags = val->dpl; if (val->type ==
    GATE_INTERRUPT) info[0].flags |= 1 << 2; +#endif +

It works.

I am also seeing coredumps from dt_module.c as dm_aslen seems to be 0, so
when it enters the for loop, the first run with 0 gives problems,
introducing a length check prevents this issue.

--- a/libdtrace/dt_module.c
+++ b/libdtrace/dt_module.c
@@ -992,9 +992,12 @@ asmap[i]->st_size);_/
}
} else {
Elf32_Sym *_asmap = dmp->dm_asmap;

  • for (i = 0; i < dmp->dm_aslen-1; i++) {
  • // AN no values for dmp->dm_aslen
  • if (dmp->dm_aslen > 0) {
  • for (i = 0; i < dmp->dm_aslen-1; i++) { asmap[i]->st_size =
    asmap[i+1]->st_value - asmap[i]->st_value;
  • }
  • }
  • }

I am running with the latest code and the last commit was commit 21b573221b5732
21b573221b5732


Reply to this email directly or view it on GitHubhttps://github.com//issues/44.

from linux.

Related Issues (20)

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.