GithubHelp home page GithubHelp logo

raytheonbbn / weldr Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 2.0 163 KB

Create single-executable models of distributed systems.

License: BSD 2-Clause "Simplified" License

Shell 2.96% Makefile 2.91% C++ 1.02% C 65.62% Assembly 0.81% Python 26.67%
program-analysis project-bwam

weldr's People

Contributors

alex-heinricher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

tuskaw manggoguy

weldr's Issues

[BUG] Incorrect model-dir default

Describe the bug
The --model-dir flag defaults to a hard-coded absolute path, meaning that weldr will try looking for its resources in a directory that probably doesn't exist.

To Reproduce
Run weldr without using the --model-dir/-M flag, with weldr installed in any directory other than /home/test/bwam-installer/weldr. It will quit with errors due to missing files.

Expected behavior
The default value for the flag should reference the directory into which the weldr repository was checked out.

Additional context
As of Jun. 23, 2020, the specific bug is in weldr/main.py line 17, where the --model-dir flag gets added to the argument parser.

Example Project
N/A; any attempt to execute weldr will trip this.

[BUG] Incorrect handling of relative working directory paths.

Describe the bug
If -t is specified as a relative path, the torch command files generated in deconflict_syms reference their target file with an incorrect relative path. Specifically, the path will be relative to the child of the current directory, instead of the current directory itself.

To Reproduce
Run any weldr project with -t specified as a relative path (with or without a leading dot).

Expected behavior
Weldr should use a consistent current directory for relative paths.

Additional context
N/A

Example Project
N/A; this is project-independent.

[BUG] Default library modeling is broken.

Describe the bug
Weldr defaults to using static library models. However, this feature wasn't fully re-implemented after the major changes needed to support dynamic modeling.

To Reproduce
Execute weldr without the -D flag.

Expected behavior
At the very least, switch the behavior to use dynamic modeling by default, and raise an error if you try to use static.

Additional context
Static modeling support is a very low priority for the weldr team. It's useful if your analyzer doesn't support dynamic loading, but it can only weld projects that have an option to be compiled statically.

Example Project
N/A

[BUG] Library compatibility error with fake_pthread

Describe the bug
fake_pthread/fake_setjmp.S does not link correctly when compiling libwrap_pthread.so on Ubuntu 18.04. ld reports the following relocation error:

/usr/bin/ld: bin/fake_setjmp.pic.oS: relocation R_X86_64_PC32 against symbol `sigprocmask@@GLIBC_2.2.5'
 can not be used when making a shared object; recompile with -fPIC

To Reproduce
With Weldr installed in an Ubuntu 18.04 environment, perform the folllowing steps:

  • cd <repository root>/fake_pthread
  • make clean all

Expected behavior
libwrap_pthread.so should build and link correctly.

Additional context
I'm not sure if this is specific to Ubuntu 18.04.

The file fake_setjmp.S doesn't use sigprocmask, nor does its header, fake_setjmp.h. The header includes the global header setjmp.h, because it needs the jmpbuf type. It may be coming from there, indicating a library version mismatch. Why this is interfering with PIC relocation, I don't know.

Example Project
N/A; this is project-independent.

[Question] Missing method in resolve_references

Describe the bug
Though weldr outputs a success message after compiling, the run_me binary segmentation faults right after Starting stub libraries. From the log file, the debug information shows that ELFStrItem is missing a method named resolve_references. The error location can be inferred that the fake_* directories have been built wrongly.

To Reproduce
make clean all on the fake_* directories with Makefile. Then, running make && weldr -s definition.sys -t <path to build location> <path to project location> on the example projects within this repo, and running run_me in the build location

Additional context
Though the README in the repo details the installation of weldr, it does not show any example usages of weldr in terms of building a project. It is possible that I myself have built the project wrongly, where I have used the command weldr -s definition.sys -t <path to build location> <path to project location>.

Upon debugging run_me and following its execution trace, the extrn function <local function>_weldr_init_stub_fake_stdio() called will error and kill the process. The project has been built multiple times and all built run_me segmentation faults. None of the repository code has been changed either. Is the stub table built correctly from the logs?
run.log

Example Project
The example projects within weldr.

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.