profile
viewpoint

mbebenita/LLJS 1138

LLJS: Low-Level JavaScript

josephlhall/dc25-votingvillage-report 63

A report to synthesize findings from the Defcon 25 Voting Machine Hacking Village

padenot/snappy 5

getUserMedia + OpenWebApp + hipstagram

rinon/deferrify 5

Automating deferred parsing and loading of JavaScript

rinon/escodegen 4

ECMAScript code generator

immunant/mozjpeg-rs 3

Rust port of MozJPEG

rinon/esprima-lljs 3

ECMAScript parsing infrastructure for multipurpose analysis - now in LLJS!

matthewdfuller/jobSavr 2

LinkedIn Hackathon Project - A handy service for saving jobs and aggregating additional information about them

rinon/LLJS 1

LLJS: Low-Level JavaScript

issue closedimmunant/c2rust

rust2c?

Hi, are there any plans for a complementary Rust2C utility?

closed time in 7 days

Mis012

issue commentimmunant/c2rust

rust2c?

Hi @Mis012, as a small team, we have to focus on where we think we can have the greatest impact. A Rust2C converter is not something we plan to write. Have you looked at https://github.com/thepowersgang/mrustc?

Mis012

comment created time in 7 days

issue openedimmunant/c2rust

rust2c?

Hi, are there any plans for a complementary Rust2C utility?

created time in 7 days

issue openedimmunant/c2rust

FTBFS on Linux (OpenSUSE/Tumbleweed)

The builds end with this:

   Compiling sequence_trie v0.3.6
error[E0433]: failed to resolve: maybe a missing crate `rustc_target`?
 --> c2rust-ast-builder/src/builder.rs:3:5
  |
3 | use rustc_target::spec::abi::{self, Abi};
  |     ^^^^^^^^^^^^ maybe a missing crate `rustc_target`?

error[E0432]: unresolved import `rustc`
 --> c2rust-ast-builder/src/builder.rs:2:5
  |
2 | use rustc::hir;
  |     ^^^^^ maybe a missing crate `rustc`?

error[E0433]: failed to resolve: use of undeclared type or module `abi`
  --> c2rust-ast-builder/src/builder.rs:71:9
   |
71 |         abi::lookup(self).expect(&format!("unrecognized string for Abi: {:?}", self))
   |         ^^^ use of undeclared type or module `abi`

error[E0412]: cannot find type `Abi` in this scope
  --> c2rust-ast-builder/src/builder.rs:69:15
   |
69 | impl<'a> Make<Abi> for &'a str {
   |               ^^^ not found in this scope

error[E0412]: cannot find type `Abi` in this scope
  --> c2rust-ast-builder/src/builder.rs:70:37
   |
70 |     fn make(self, _mk: &Builder) -> Abi {
   |                                     ^^^ not found in this scope

error[E0412]: cannot find type `Abi` in this scope
  --> c2rust-ast-builder/src/builder.rs:81:27
   |
81 | impl<'a> Make<Extern> for Abi {
   |                           ^^^ not found in this scope

   Compiling json v0.12.0
   Compiling strum v0.16.0
   Compiling fake-simd v0.1.2
   Compiling diff v0.1.12
   Compiling glob v0.2.11
   Compiling is-match v0.1.0
   Compiling strum v0.15.0
   Compiling open v1.3.2
error: aborting due to 6 previous errors

Some errors have detailed explanations: E0412, E0432, E0433.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `c2rust-ast-builder`.
warning: build failed, waiting for other jobs to finish...
error: build failed
c2rust@stitny (master *)$ 

Complete build log from building with llvm/clang 10 and running cargo +nightly-2019-12-05 build.

created time in 10 days

created repositoryDrItanium/i960SxSimpleBreakoutBoard

The hardware design files for a 4-layer PCB to breakout the lines of an i960Sx PLCC84 processor

created time in 11 days

startedrhysd/kiro-editor

started time in 13 days

created repositoryDrItanium/MCP23S17Interface

Kicad PCB files for a MCP23S17

created time in 13 days

Pull request review commentimmunant/c2rust

llvm 11 fixes

 static std::vector<const char *> augment_argv(int argc, const char *argv[]) {     SmallString<128> P("-extra-arg=-resource-dir=" CLANG_BIN_PATH);     llvm::sys::path::append(P, "..", Twine("lib") + CLANG_LIBDIR_SUFFIX,                             "clang", CLANG_VERSION_STRING);-    std::string resource_dir = P.str();+    std::string resource_dir = P.str().str();

I don't think an extra ifdef is necessary, but it is of course your call!

It's fine, no ifdef needed.

kaspar030

comment created time in 16 days

Pull request review commentimmunant/c2rust

llvm 11 fixes

 class TranslateConsumer : public clang::ASTConsumer {             } #else  // CLANG_VERSION_MAJOR >= 10             const FileID file = sourceMgr.getMainFileID();-            auto comments = Context.getRawCommentList().getCommentsInFile(file);+            auto comments = Context.Comments.getCommentsInFile(file);

Does that warrant an #ifdef?

No, that's fine, as long as the new code works on older versions.

kaspar030

comment created time in 16 days

created repositorykosborn/Gmail-Phish-Addon

A Google Workspace add-on that generated phishing reports.

created time in 16 days

pull request commentimmunant/c2rust

llvm 11 fixes

I don't think an extra ifdef is necessary, but it is of course your call!

Please advise. No ifdefs are necessary down to at least clang 6. I can add them if you'd prefer that.

kaspar030

comment created time in 16 days

startedXanthos-Code/vintel

started time in 16 days

startedmermaid-js/mermaid

started time in 16 days

startedjohn01dav/polyerror

started time in 16 days

Pull request review commentimmunant/c2rust

llvm 11 fixes

 static std::vector<const char *> augment_argv(int argc, const char *argv[]) {     SmallString<128> P("-extra-arg=-resource-dir=" CLANG_BIN_PATH);     llvm::sys::path::append(P, "..", Twine("lib") + CLANG_LIBDIR_SUFFIX,                             "clang", CLANG_VERSION_STRING);-    std::string resource_dir = P.str();+    std::string resource_dir = P.str().str();

I compiled this in a ubuntu bionic container with clang-6 and libclang-6:

root@71976200ca48:/src/c2rust# cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.5 LTS"
root@71976200ca48:/src/c2rust# clang --version
clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
root@71976200ca48:/src/c2rust# cargo --version
cargo 1.41.0-nightly (626f0f40e 2019-12-03)
root@71976200ca48:/src/c2rust# rustc --version
rustc 1.41.0-nightly (6d77e45f0 2019-12-04)
root@71976200ca48:/src/c2rust# git describe  
0.1.0-3140-g8e7131e6

The test suite passed:

root@71976200ca48:/src/c2rust# python3 ./scripts/test_translator.py --debug ./tests
[...]
Test summary:                                                            
  unexpected failures: 0                                                 
  unexpected successes: 0                                                
  expected failures: 3                                                   
  successes: 108

I don't think an extra ifdef is necessary, but it is of course your call!

kaspar030

comment created time in 19 days

Pull request review commentimmunant/c2rust

llvm 11 fixes

 class TranslateConsumer : public clang::ASTConsumer {             } #else  // CLANG_VERSION_MAJOR >= 10             const FileID file = sourceMgr.getMainFileID();-            auto comments = Context.getRawCommentList().getCommentsInFile(file);+            auto comments = Context.Comments.getCommentsInFile(file);

New in clang 11 is the removal of the getter. The field is public since at least clang 6. Does that warrant an #ifdef?

kaspar030

comment created time in 19 days

Pull request review commentimmunant/c2rust

llvm 11 fixes

 class TranslateConsumer : public clang::ASTConsumer {             } #else  // CLANG_VERSION_MAJOR >= 10             const FileID file = sourceMgr.getMainFileID();-            auto comments = Context.getRawCommentList().getCommentsInFile(file);+            auto comments = Context.Comments.getCommentsInFile(file);

If this is new to clang 11, it should be wrapped in a version check (see CLANG_VERSION_MAJOR above).

kaspar030

comment created time in 20 days

Pull request review commentimmunant/c2rust

llvm 11 fixes

 static std::vector<const char *> augment_argv(int argc, const char *argv[]) {     SmallString<128> P("-extra-arg=-resource-dir=" CLANG_BIN_PATH);     llvm::sys::path::append(P, "..", Twine("lib") + CLANG_LIBDIR_SUFFIX,                             "clang", CLANG_VERSION_STRING);-    std::string resource_dir = P.str();+    std::string resource_dir = P.str().str();

Same as above: wrap in a check on CLANG_VERSION_MAJOR.

kaspar030

comment created time in 20 days

pull request commentimmunant/c2rust

llvm 11 fixes

I've merged this into my integration branch (for-riot, which contains all my PRs), and it's still working fine with -10.

kaspar030

comment created time in 21 days

PR opened immunant/c2rust

llvm 11 fixes

My Arch Linux bumped me to clang/llvm 11 today, which broke c2rust compilation.

This PR contains the fixes I needed to make it compile:

  1. ASTContext::getRawCommentList() was removed. It was a getter for ASTContext::Comments, which is a public field. So there's a commit that directly accesses the field.

  2. SmallString::str() changed semantics slightly, causing it to not map to std::string. A double .str().str() goes through StringRef to std::string. LLVM 11 offers a direct std::string(X) operator, but to keep this compatible, I kept the double call.

I did not test this on clang/llvm < 11...

+2 -2

0 comment

1 changed file

pr created time in 21 days

PR opened immunant/c2rust

Update handlebars to 3.0

handlebars 3.0 provides better performance than 2.0

+22 -3

0 comment

2 changed files

pr created time in 22 days

startedmoriturus/ktra

started time in a month

push eventimmunant/immunant.github.io

Per Larsen

commit sha c90dbbd19170bffe95980d28d32f21a6877869cc

Update job post

view details

push time in a month

startednpcole/npyscreen

started time in a month

startedNukesor/pueue

started time in a month

startedspacejam/sled

started time in a month

pull request commentimmunant/c2rust

asm-casts: Run on no_std

I still see https://crates.io/crates/c2rust-asm-casts as being the 0.1.1 of last 2019-10-30, might something have gone wrong during the upload?

chrysn

comment created time in a month

startedlockfale/OSINT-Framework

started time in a month

issue commentimmunant/c2rust

Tracking Issue: Translation nightly features

Method wrapping_offset_from (which is often used in c2rust output) has been deprecated since 1.46 and it is being removed in ptr_offset_from stabilization PR: rust-lang/rust#74238

And looks like it's entirely gone now, says the feature doesn't exist and the wrapping_offset_from call no longer exists in the source.

TheDan64

comment created time in a month

more