Skip to content

Crash at usage of GaussianBlur with small images #40

@nbossard

Description

@nbossard

Hello, I have been facing an issue when using method GaussianBlur.

If used on images smaller than (around) 230 px of width the library will crash systematically with error like following:

Error: Output buffer gaussianblur is accessed at -384, which is before the min (0) in dimension 1
SIGABRT: abort
PC=0x7f896a72000b m=5 sigcode=18446744073709551610
signal arrived during cgo execution

goroutine 53 [syscall]:
runtime.cgocall(0xeaf440, 0xc00045b550)
        /usr/local/go/src/runtime/cgocall.go:157 +0x5c fp=0xc00045b528 sp=0xc00045b4f0 pc=0x41201c
github.com/octu0/blurry._Cfunc_libgaussianblur(0xc0002b6000, 0x27, 0x67, 0x43fa0000, 0xc000362000)
        _cgo_gotypes.go:651 +0x4c fp=0xc00045b550 sp=0xc00045b528 pc=0xe383ec
github.com/octu0/blurry.Gaussianblur(0xc000490300, 0x407f400000000000)
        /home/vagrant/go/pkg/mod/github.com/octu0/[email protected]/gaussianblur.go:48 +0x9d fp=0xc00045b5a0 sp=0xc00045b550 pc=0xe3873d

Increasing the image width at 240px "solves" the issue. Seems that Boxblur is impacted too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions