Coder Social home page Coder Social logo

Comments (6)

jweyrich avatar jweyrich commented on September 28, 2024

Hi! Thanks for the report! :-)
The input argument (-i) accepts a single file, and that's why open fails with Bad address, since it couldn't access the file you informed. In the sample you provided, it seems that you're informing the path to a folder. Is that right? If so, reading all files from a directory is currently not supported, but it's a feature that I could consider if you can explain me your use case. As a side note, currently, the tool only converts the raw contents of files (binary, spreadsheets, text, whatever) to PNG and from PNG.
Does that make sense?

from imgify.

frokaikan avatar frokaikan commented on September 28, 2024

But I also tried to pass the file to bin2png like this:
root@xxx:/opt/imgify# ./bin2png -i other/not_kitty.bmp -o png_out/out.png
open: Bad address

=================================================================
==30677==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 20 byte(s) in 1 object(s) allocated from:
#0 0x436e10 in __interceptor_strdup (/opt/imgify/bin2png+0x436e10)
#1 0x512de9 in parse_options /opt/imgify/./common_options.h:56:22
#2 0x512de9 in main /opt/imgify/./common_main.h:10
#3 0x7ff9a5595b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Direct leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x436e10 in __interceptor_strdup (/opt/imgify/bin2png+0x436e10)
#1 0x512eab in parse_options /opt/imgify/./common_options.h:59:23
#2 0x512eab in main /opt/imgify/./common_main.h:10
#3 0x7ff9a5595b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

SUMMARY: AddressSanitizer: 36 byte(s) leaked in 2 allocation(s).

It also tells me that I got a bad address.

from imgify.

jweyrich avatar jweyrich commented on September 28, 2024

Good news: I believe I managed to get rid of those memory leak warnings.

Bad news: I couldn't reproduce the issue you described. I tried with various files, including the BMP sample you provided.

screen shot 2018-07-18 at 19 17 11

from imgify.

frokaikan avatar frokaikan commented on September 28, 2024

But I got this...
image

from imgify.

jweyrich avatar jweyrich commented on September 28, 2024
  1. Which Linux distribution are you running?
  2. Which filesystem it's using?
  3. Do you have any FS mount-points related to /opt? In other words, are you mounting /opt (or anything contained in it) from somewhere else?

Looks like the stat syscall is returning EFAULT instead of ENOENT - which is weird.

from imgify.

frokaikan avatar frokaikan commented on September 28, 2024

I use Ubuntu 16 (with Oracla VM VirtualBox, built on Windows 10) and /opt is NOT a mount-point.

from imgify.

Related Issues (1)

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.