Code Monkey home page Code Monkey logo

Comments (13)

0-wiz-0 avatar 0-wiz-0 commented on May 27, 2024

I don't know what Solus is, you'll have to provide more information. It works for me on a CentOS Linux.
Please run "./runtest -v --keep-broken encryption-nonrandom-aes128.test" in build/regress and provide the output and the contents of the resulting sandbox* directory.

from libzip.

kyrios123 avatar kyrios123 commented on May 27, 2024
 ./runtest -v --keep-broken encryption-nonrandom-aes128.test
Binary files ../encrypt-aes128-noentropy.zip and encrypt.zzip differ
encryption-nonrandom-aes128 -- FAIL: files

ls -la sandbox*
total 28
drwxrwxr-x 2 build build  4096 Dec 29 21:47 .
drwxrwxr-x 4 build build 20480 Dec 29 21:47 ..
-rw-rw-r-- 1 build build   260 Dec 29 21:47 encrypt.zzip

encrypt.zzip

Thanks for the fast reply !

from libzip.

0-wiz-0 avatar 0-wiz-0 commented on May 27, 2024

That's weird. Does the preload test work for you?
If yes, please investigate if zip_random properly returns a buffer full of zeroes when running these tests.

cp encrypt-none.zip encrypt.zzip
LD_LIBRARY_PRELOAD=nonrandomopen.so gdb ziptool
br zip_random
r encrypt.zzip set_file_encryption 1 AES-128 no-entropy

from libzip.

kyrios123 avatar kyrios123 commented on May 27, 2024

All the tests work fine except the 3 encryption-nonrandom-aes ones.
These test work fine with libzip 1.3.2 on the same machine.

I am a total n00b with gdb. There is something I missed because it cannot find the "zip_random" function

build@solus-budgie ~/YPKG/root/libzip/build/libzip-1.4.0/regress $ cp encrypt-none.zip encrypt.zzip
build@solus-budgie ~/YPKG/root/libzip/build/libzip-1.4.0/regress $ export LD_LIBRARY_PATH=/home/build/YPKG/root/libzip/install/usr/lib
build@solus-budgie ~/YPKG/root/libzip/build/libzip-1.4.0/regress $ export LD_LIBRARY_PRELOAD=/home/build/YPKG/root/libzip/build/libzip-1.4.0/regress/libnonrandomopen.so
build@solus-budgie ~/YPKG/root/libzip/build/libzip-1.4.0/regress $ gdb /home/build/YPKG/root/libzip/install/usr/bin/ziptool
GNU gdb (GDB) 8.0
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-solus-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/build/YPKG/root/libzip/install/usr/bin/ziptool...(no debugging symbols found)...done.
(gdb) br zip_random
Function "zip_random" not defined.
Make breakpoint pending on future shared library load? (y or [n]) 
(gdb) r encrypto.zzip set_file_encryption 1 AES-128 no-entropy
Starting program: /home/build/YPKG/root/libzip/install/usr/bin/ziptool encrypto.zzip set_file_encryption 1 AES-128 no-entropy
can't set file encryption method at index '1' to 'AES-128': Invalid argument
[Inferior 1 (process 4699) exited with code 01]
(gdb) 

from libzip.

0-wiz-0 avatar 0-wiz-0 commented on May 27, 2024

Sorry, there was a typo in the instructions. The file name is just encrypt.zzip without the o.

from libzip.

kyrios123 avatar kyrios123 commented on May 27, 2024

Arf... I should have seen that typo.
Here is the output

Reading symbols from /home/build/YPKG/root/libzip/install/usr/bin/ziptool...(no debugging symbols found)...done.
(gdb) br zip_random
Function "zip_random" not defined.
Make breakpoint pending on future shared library load? (y or [n]) 
(gdb) r encrypt.zzip set_file_encryption 1 AES-128 no-entropy
Starting program: /home/build/YPKG/root/libzip/install/usr/bin/ziptool encrypt.zzip set_file_encryption 1 AES-128 no-entropy
[Inferior 1 (process 24163) exited normally]
(gdb) 

from libzip.

dillof avatar dillof commented on May 27, 2024

Hm, that's strange, zip_random should definitely get called.

(no debugging symbols found) sounds like you compiled without -g, maybe that's confuding gdb?

from libzip.

0-wiz-0 avatar 0-wiz-0 commented on May 27, 2024

I just installed Solus in a Virtualbox (from Solus-3-MATE.iso) and tried building both libzip git HEAD as well as libzip-1.4.0 and could not reproduce the problem. I'm sorry, you'll have to debug this yourself some more.

from libzip.

0-wiz-0 avatar 0-wiz-0 commented on May 27, 2024

Not reproducible.

from libzip.

seb128 avatar seb128 commented on May 27, 2024

The tests are failing the same way on Ubuntu
https://launchpadlibrarian.net/522320032/buildlog_ubuntu-hirsute-amd64.libzip_1.7.3-1_BUILDING.txt.gz

Seems to be due to the toolchain default since building without -Wl,-Bsymbolic-functions fixes the issue

from libzip.

0-wiz-0 avatar 0-wiz-0 commented on May 27, 2024

Thanks for the detail about -Wl,-Bsymbolic-functions. We've adapted the test framework to recognize this case and skip the AES tests.

Please test 4939df7 or newer and report back.

If you want the AES tests to run, you'll have to build without the flag.

AES functionality itself does not depend on the flag, just the test cases.

from libzip.

seb128 avatar seb128 commented on May 27, 2024

The recent commits do fix the Ubuntu build indeed, now the tests are skipped and not failing, thanks!

from libzip.

0-wiz-0 avatar 0-wiz-0 commented on May 27, 2024

Thanks for checking, @seb128 !

from libzip.

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.