Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > CSDb Entries > Release id #154516 : Subsizer 0.5
2017-03-18 18:36
Compyx

Registered: Jan 2005
Posts: 631
Release id #154516 : Subsizer 0.5

Better to take this to the forum.

After adding some printf() statements to track the file open failure with "some demo.prg", the quoting of arguments works, but only sometimes. Which usually indicates a deeper problem somewhere.

Running through valgrind I get same nasty messages:
compyx@asus-p5k:~$ valgrind bin/subsizer "music demo.prg"
==25408== Memcheck, a memory error detector
==25408== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==25408== Using Valgrind-3.12.0.SVN and LibVEX; rerun with -h for copyright info
==25408== Command: bin/subsizer music\ demo.prg
==25408== 
argv[0] = 'bin/subsizer'
argv[1] = 'music demo.prg'
build matches...
==25408== Warning: set address range perms: large range [0x395f8040, 0x98bd9040) (undefined)
...0.49 s
optimizing matches...
==25408== Conditional jump or move depends on uninitialised value(s)
==25408==    at 0x10B6F4: cost_enc (in /home/compyx/bin/subsizer)
==25408==    by 0x10C020: crunch_normal_int.isra.1 (in /home/compyx/bin/subsizer)
==25408==    by 0x109818: main (in /home/compyx/bin/subsizer)
==25408== 
 5264 (left 70.84%)
0000113235660150,1112,1010122424555667,222233346666789A,132223234566679C
==25408== Conditional jump or move depends on uninitialised value(s)
==25408==    at 0x4C31CC2: __memcmp_sse4_1 (vg_replace_strmem.c:1094)
==25408==    by 0x10C4B4: crunch_normal_int.isra.1 (in /home/compyx/bin/subsizer)
==25408==    by 0x109818: main (in /home/compyx/bin/subsizer)
==25408== 
==25408== Conditional jump or move depends on uninitialised value(s)
==25408==    at 0x4C31CFD: __memcmp_sse4_1 (vg_replace_strmem.c:1094)
==25408==    by 0x10C4B4: crunch_normal_int.isra.1 (in /home/compyx/bin/subsizer)
==25408==    by 0x109818: main (in /home/compyx/bin/subsizer)
==25408== 
==25408== Conditional jump or move depends on uninitialised value(s)
==25408==    at 0x10C4B7: crunch_normal_int.isra.1 (in /home/compyx/bin/subsizer)
==25408==    by 0x109818: main (in /home/compyx/bin/subsizer)
==25408== 
 4899 (left 65.93%)
0000113235660150,1112,1010122332456667,222323346666789A,132223234566679C
 4897 (left 65.90%)
0000113235660150,1112,1010122332456667,222323346666789A,132223234566679C
==25408== Conditional jump or move depends on uninitialised value(s)
==25408==    at 0x4C31CD6: __memcmp_sse4_1 (vg_replace_strmem.c:1094)
==25408==    by 0x10C4B4: crunch_normal_int.isra.1 (in /home/compyx/bin/subsizer)
==25408==    by 0x109818: main (in /home/compyx/bin/subsizer)
==25408== 
...2.02 s
==25408== Warning: set address range perms: large range [0x395f8028, 0x98bd9058) (noaccess)
generating output...
...0.02 s
packed 7431 bytes into 4897 bytes
verifed 7431 bytes...ok
==25408== 
==25408== HEAP SUMMARY:
==25408==     in use at exit: 0 bytes in 0 blocks
==25408==   total heap usage: 101 allocs, 101 frees, 1,624,666,687 bytes allocated
==25408== 
==25408== All heap blocks were freed -- no leaks are possible
==25408== 
==25408== For counts of detected and suppressed errors, rerun with: -v
==25408== Use --track-origins=yes to see where uninitialised values come from
==25408== ERROR SUMMARY: 6 errors from 5 contexts (suppressed: 0 from 0)


I tried using --track-origins=yes, but that completely borked my system, that filled my memory and my swap space and made my system completely unresponsive, had to kill valgrind via a tty.


Is there bug a tracker somewhere for this?
 
... 18 posts hidden. Click here to view all posts....
 
2017-03-18 20:03
tlr

Registered: Sep 2003
Posts: 1701
Gaah... Maybe I shouldn't have done as many kludges when coding this. :/

I'm sure there is some stack corruption problem but not easily reproducible here unfortunately. Will clean up some nastyness for the next release.
tlr@pinecone:subsizer$ valgrind subsizer -x "tests/Ninth.prg"
==13935== Memcheck, a memory error detector
==13935== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==13935== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==13935== Command: subsizer -x tests/Ninth.prg
==13935== 
read 'tests/Ninth.prg' $0801-$7400.
detected sys: $4000
build matches...
==13935== Warning: set address range perms: large range [0x3a048040, 0x99629040) (undefined)
...6.48 s
optimizing matches...
 7139 (left 25.82%)
1110334466621000,1012,0000001022345657,02112344560678AD,02103434555789AF
 6677 (left 24.15%)
1110334465462410,1012,0000001022345657,02112344560678AD,02103434555789AF
 6682 (left 24.17%)
1110334465462410,1012,0000001022345657,02112344560678AD,02103434555789AF
...6.69 s
==13935== Warning: set address range perms: large range [0x3a048028, 0x99629058) (noaccess)
generating output...
...0.02 s
safe = 2
packed 27647 bytes (109 blocks) into 6974 bytes (28 blocks)
==13935== 
==13935== HEAP SUMMARY:
==13935==     in use at exit: 0 bytes in 0 blocks
==13935==   total heap usage: 100 allocs, 100 frees, 1,624,919,704 bytes allocated
==13935== 
==13935== All heap blocks were freed -- no leaks are possible
==13935== 
==13935== For counts of detected and suppressed errors, rerun with: -v
==13935== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
tlr@pinecone:subsizer$ 
2017-03-18 20:09
soci

Registered: Sep 2003
Posts: 472
Works fine here, also for spaced filenames. Similar system but 32 bit so I had to adjust the following hack otherwise the allocation didn't succeed with valgrind:
safe_malloc(200000000 * sizeof(Match), "matches");
2017-03-18 20:15
tlr

Registered: Sep 2003
Posts: 1701
Interesting! What version of gcc?

I have:
tlr@pinecone:subsizer$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

tlr@pinecone:subsizer$
2017-03-18 20:23
soci

Registered: Sep 2003
Posts: 472
gcc (Debian 6.3.0-8) 6.3.0 20170221

There are some harmless warnings with it:
fold.c: In function ‘fold’:
fold.c:339:12: warning: unused variable ‘n’ [-Wunused-variable]
     size_t n = low_limit - sa;
            ^
At top level:
fold.c:142:13: warning: ‘dump_rle_entries’ defined but not used [-Wunused-function]
 static void dump_rle_entries(void)
             ^~~~~~~~~~~~~~~~
In file included from fold.c:15:0:
decrunchers.h:277:18: warning: ‘fs_list_header’ defined but not used [-Wunused-variable]
 static FixStruct fs_list_header[] = {
                  ^~~~~~~~~~~~~~
decrunchers.h:270:18: warning: ‘fs_list_tail’ defined but not used [-Wunused-variable]
 static FixStruct fs_list_tail[] = {
                  ^~~~~~~~~~~~
decrunchers.h:263:18: warning: ‘fs_list_decruncher’ defined but not used [-Wunused-variable]
 static FixStruct fs_list_decruncher[] = {
                  ^~~~~~~~~~~~~~~~~~
2017-03-21 18:51
tlr

Registered: Sep 2003
Posts: 1701
update: Subsizer 0.5.1
subsizer 0.5.1, 2017-03-21
  - added LICENSE.txt
  - give error if no end marker can be found.
  - got rid of a few warnings as reported by soci.
  - fixed issue with uninitialized memory as reported by compyx.
  - added decruncher source due to popular demand.  well, only bitbreaker. :)
    (caution: encoding may change between versions)
2017-03-24 04:01
ChristopherJam

Registered: Aug 2004
Posts: 1359
Has anyone tested this on the Pearl for Pigs corpus?

I'm writing a benchmarks page at codebase ( http://www.codebase64.org/doku.php?id=base:compression_benchmar.. ), and would be interesting to see where Subsizer fits in the big picture

I'll add a scatter plot soonish.
2017-03-24 06:35
tlr

Registered: Sep 2003
Posts: 1701
I have these for subsizer 0.5:
    file           size  (blks)   left    gain   time   mem
    -----------------------------------------------------------
        pfp1.bin:  2956 (12)     26.85%  73.15%  0.34s  30.05M
        pfp2.bin:  2205 (9)      44.34%  55.66%  0.10s  27.47M
        pfp3.bin:  1788 (8)      45.28%  54.72%  0.08s  25.08M
        pfp4.bin:  3456 (14)     49.26%  50.74%  0.16s  25.46M
        pfp5.bin:  19519 (77)    56.15%  43.85%  1.23s  74.61M
        pfp6.bin:  8396 (34)     26.57%  73.43%  1.33s  83.25M
        pfp7.bin:  8766 (35)     42.99%  57.01%  0.51s  32.22M
        pfp8.bin:  3063 (13)     53.61%  46.39%  0.15s  24.89M
        pfp9.bin:  5307 (21)     59.23%  40.77%  0.14s  25.58M
    -----------------------------------------------------------
No decruncher speeds as there is no standalone decruncher yet.

Curious question: are we measuring those in cycles without badlines?
2017-03-24 06:44
ChristopherJam

Registered: Aug 2004
Posts: 1359
Quoting tlr
I have these for subsizer 0.5:
…
No decruncher speeds as there is no standalone decruncher yet.

Curious question: are we measuring those in cycles without badlines?


Thanks! Yes, time in cycles with neither badlines nor interrupts, either by using CIA or breakpoints+cyclecounter in VICE.
2017-03-24 07:53
ChristopherJam

Registered: Aug 2004
Posts: 1359
Also, wow - those are tiny!

Even smaller than exomizer. I really need to time those two...
2017-03-24 10:57
Frantic

Registered: Mar 2003
Posts: 1626
Well, if you call yourself The Leader, you need to be second to none!
Previous - 1 | 2 | 3 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Mason/Unicess
fandenvoldsk
deetsay
Perff/No Name
Bansai/BSILabs
Jucke
Guests online: 339
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 No Bounds  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 The Ghost  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 Party Elk 2  (9.7)
2 Cubic Dream  (9.6)
3 Copper Booze  (9.5)
4 Rainbow Connection  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Onscreen 5k  (9.5)
7 Dawnfall V1.1  (9.5)
8 Quadrants  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Nostalgia  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Logo Graphicians
1 Sander  (10)
2 Facet  (9.7)
3 Mermaid  (9.4)
4 Pal  (9.4)
5 Shine  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.046 sec.