Displaying 15 results from an estimated 15 matches for "png_ptr".
Did you mean:
end_ptr
2019 Dec 18
2
Missing code depending on a #ifdef within the .ll file
Hi all,
I have managed to compile libpng using wllvm and obtain the IR of pngpixel
( small tool which is part of libpng ).
libpng has a function called png_check_IHDR:
void /* PRIVATE */
png_check_IHDR(png_const_structrp png_ptr,
png_uint_32 width, png_uint_32 height, int bit_depth,
int color_type, int interlace_type, int compression_type,
int filter_type)
{
int error = 0;
/* Check for width and height valid values */
if (width == 0)
{
png_warning(png_ptr, "Image width is zero in IHDR"...
2019 Dec 18
2
Missing code depending on a #ifdef within the .ll file
...:
>
>> Hi all,
>> I have managed to compile libpng using wllvm and obtain the IR of
>> pngpixel ( small tool which is part of libpng ).
>>
>> libpng has a function called png_check_IHDR:
>>
>> void /* PRIVATE */
>> png_check_IHDR(png_const_structrp png_ptr,
>> png_uint_32 width, png_uint_32 height, int bit_depth,
>> int color_type, int interlace_type, int compression_type,
>> int filter_type)
>> {
>> int error = 0;
>>
>> /* Check for width and height valid values */
>> if (width == 0)...
2019 Mar 10
5
Help with bitcast instruction
...t_def*,
i8*)* %free_fn) #15
I would like to understand where bitcast is defined because it is not
defined within libpng. I also noticed that the @ is not present, what does
the missing @ mean? I guess it must be an LLVM function.
The bitcast operation seems to represent the following C code:
if (png_ptr != NULL)
{
png_ptr->mem_ptr = mem_ptr;
png_ptr->malloc_fn = malloc_fn;
png_ptr->free_fn = free_fn;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190310/ee28921d/attachment...
2005 Mar 07
0
gcc4 warnings
...--- syslinux-3.07/com32/lib/libpng/pngwrite.c.gcc4 2005-01-08 00:58:20.000000000 -0500
+++ syslinux-3.07/com32/lib/libpng/pngwrite.c 2005-03-07 11:26:46.000000000 -0500
@@ -435,7 +435,7 @@
png_malloc_ptr malloc_fn, png_free_ptr free_fn)
{
#endif /* PNG_USER_MEM_SUPPORTED */
- png_structp png_ptr;
+ volatile png_structp png_ptr;
#ifdef PNG_SETJMP_SUPPORTED
#ifdef USE_FAR_KEYWORD
jmp_buf jmpbuf;
--- syslinux-3.07/com32/lib/libpng/pngread.c.gcc4 2005-01-08 00:58:20.000000000 -0500
+++ syslinux-3.07/com32/lib/libpng/pngread.c 2005-03-07 11:26:46.000000000 -0500
@@ -33,7 +33,7 @@
{
#e...
2006 Feb 09
1
make: Target `all' not remade because of errors. (PR#8585)
...included from rbitmap.c:45:
/usr/include/png.h:1034: error: parse error before "z_stream"
/usr/include/png.h:1262: error: parse error before '}' token
/usr/include/png.h:1821: error: parse error before "png_zalloc"
/usr/include/png.h:1821: error: parse error before "png_ptr"
/usr/include/png.h:1825: error: parse error before "png_ptr"
rbitmap.c: In function `my_png_error':
rbitmap.c:72: error: dereferencing pointer to incomplete type
rbitmap.c: In function `R_SaveAsPng':
rbitmap.c:121: error: dereferencing pointer to incomplete type
make[4]: ***...
2010 Jun 05
1
rgl installation failure
...map.h:23: error: ‘png_sig_cmp’ was not declared in this scope
pngpixmap.h:20: warning: ignoring return value of ‘size_t fread(void*,
size_t, size_t, FILE*)’, declared with attribute warn_unused_result
pngpixmap.h: In constructor ‘PNGPixmapFormat::Load::Load(FILE*, Pixmap*)’:
pngpixmap.h:66: error: ‘png_ptr’ was not declared in this scope
pngpixmap.h:67: error: ‘info_ptr’ was not declared in this scope
pngpixmap.h: In member function ‘bool PNGPixmapFormat::Load::init()’:
pngpixmap.h:76: error: ‘png_ptr’ was not declared in this scope
pngpixmap.h:76: error: ‘PNG_LIBPNG_VER_STRING’ was not declared in t...
2006 Feb 09
0
make: Target `all' not remade because of errors.
...included from rbitmap.c:45:
/usr/include/png.h:1034: error: parse error before "z_stream"
/usr/include/png.h:1262: error: parse error before '}' token
/usr/include/png.h:1821: error: parse error before "png_zalloc"
/usr/include/png.h:1821: error: parse error before "png_ptr"
/usr/include/png.h:1825: error: parse error before "png_ptr"
rbitmap.c: In function `my_png_error':
rbitmap.c:72: error: dereferencing pointer to incomplete type
rbitmap.c: In function `R_SaveAsPng':
rbitmap.c:121: error: dereferencing pointer to incomplete type
make[4]: ***...
2020 Jan 03
3
Interpreter crash due to an "Unknown constant pointer type!"
...ENABLE_RTTI=ON
-DLLVM_ENABLE_FFI=ON -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_ASSERTIONS=ON ..
cmake --build . -- -j8 && sudo cmake --build . --target install
Once lli was installed it was enough to use the .bc
/usr/local/bin/lli --debug --force-interpreter pngpixel_crash.bc 0 0
mini.png
...
png_ptr->width: 1
max_pixel_depth: 24
row_bytes: 28
...
About to interpret: store <2 x %struct.code*> <%struct.code*
getelementptr inbounds ([512 x %struct.code], [512 x %struct.code]*
@fixedtables.lenfix.681, i64 0, i64 0), %struct.code* getelementptr
inbounds ([32 x %struct.code], [32 x %st...
2020 Feb 10
2
Interpreter crash due to an "Unknown constant pointer type!"
...ABLE_ASSERTIONS=ON ..
>> cmake --build . -- -j8 && sudo cmake --build . --target install
>>
>> Once lli was installed it was enough to use the .bc
>>
>> /usr/local/bin/lli --debug --force-interpreter pngpixel_crash.bc 0 0
>> mini.png
>> ...
>> png_ptr->width: 1
>> max_pixel_depth: 24
>> row_bytes: 28
>> ...
>> About to interpret: store <2 x %struct.code*> <%struct.code*
>> getelementptr inbounds ([512 x %struct.code], [512 x %struct.code]*
>> @fixedtables.lenfix.681, i64 0, i64 0), %struct.code*...
2019 Dec 24
2
Interpreter crash due to an "Unknown constant pointer type!"
...finitely provide the example bc file
>> and image ( please see the attachments ). For the debug + asserts I need a
>> bit of more time.
>>
>> Anyway the full output of lli is:
>>
>> lli --force-interpreter examples/pngpixel_crash.bc 0 0 examples/mini.png
>> png_ptr->width: 1
>> max_pixel_depth: 24
>> row_bytes: 28
>> Unknown constant pointer type!
>> UNREACHABLE executed at
>> /home/al/Desktop/llvm-6.0.1.src/lib/ExecutionEngine/ExecutionEngine.cpp:1007!
>> LLVMSymbolizer: error reading file: No such file or directory
>...
2019 Dec 19
2
Interpreter crash due to an "Unknown constant pointer type!"
Hi David,
Thanks for the suggestions. I can definitely provide the example bc file
and image ( please see the attachments ). For the debug + asserts I need a
bit of more time.
Anyway the full output of lli is:
lli --force-interpreter examples/pngpixel_crash.bc 0 0 examples/mini.png
png_ptr->width: 1
max_pixel_depth: 24
row_bytes: 28
Unknown constant pointer type!
UNREACHABLE executed at
/home/al/Desktop/llvm-6.0.1.src/lib/ExecutionEngine/ExecutionEngine.cpp:1007!
LLVMSymbolizer: error reading file: No such file or directory
#0 0x0000000001765ee9 (lli+0x1765ee9)
#1 0x00000000017660...
2020 Feb 01
0
Interpreter crash due to an "Unknown constant pointer type!"
...t; cmake --build . -- -j8 && sudo cmake --build . --target install
>>>
>>> Once lli was installed it was enough to use the .bc
>>>
>>> /usr/local/bin/lli --debug --force-interpreter pngpixel_crash.bc 0 0
>>> mini.png
>>> ...
>>> png_ptr->width: 1
>>> max_pixel_depth: 24
>>> row_bytes: 28
>>> ...
>>> About to interpret: store <2 x %struct.code*> <%struct.code*
>>> getelementptr inbounds ([512 x %struct.code], [512 x %struct.code]*
>>> @fixedtables.lenfix.681, i64 0...
2019 Mar 12
3
Help with bitcast instruction
...truct.png_struct_def* %create_struct, i8* %mem_ptr, i8*
(%struct.png_struct_def*, i64)* %malloc_fn, void (%struct.png_struct_def*,
i8*)* %free_fn) "the parameters passed to the png_set_mem_fn"
As a clarification the function is declared like this:
void PNGAPI
png_set_mem_fn(png_structrp png_ptr, png_voidp mem_ptr, png_malloc_ptr
malloc_fn, png_free_ptr free_fn)
Thanks again
Il giorno dom 10 mar 2019 alle ore 08:59 Tim Northover <
t.p.northover at gmail.com> ha scritto:
> Hi Alberto,
>
> > I would like to understand where bitcast is defined because it is not
> d...
2019 Mar 16
2
Why getNumOperands() incorrectly returns 0?
...ountered a weird case that I cannot understand. Inside the
visitStoreInst I have a reference (F) to the function png_set_mem_fn. If I
do F->dump() i can set the IR of that function correctly e.g.:
; Function Attrs: nounwind uwtable
define void @png_set_mem_fn(%struct.png_struct_def.68* noalias %png_ptr,
i8* %mem_ptr, i8* (%struct.png_struct_def.68*, i64)* %malloc_fn, void
(%struct.png_struct_def.68*, i8*)* %free_fn) #5 {
...
}
The problem is that when I do F->getNumOperands() I have 0 as result.
Can you explain me why please?
Thanks
-------------- next part --------------
An HTML attachmen...
2019 Dec 19
2
Interpreter crash due to an "Unknown constant pointer type!"
Hi all,
as usual I'm playing with the Interpreter and unfortunately I hit a crash.
I have narrowed down the problem an the crash happens inside the inflate
function which is part of zlib and specifically at the instruction:
store <2 x %struct.code*> <%struct.code* getelementptr inbounds ([512 x
%struct.code], [512 x %struct.code]* @fixedtables.lenfix.681, i64 0, i64
0), %struct.code*