Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running the compose command inside the directory gives segmentation violation #11

Open
vargenau opened this issue Sep 28, 2022 · 0 comments

Comments

@vargenau
Copy link
Contributor

A directory sbom-composer containing two files AAA.spdx and BBB.spdx.

Files are attached (suffix .txt added to be able to upload on github).

Running the compose command inside the directory:

cd test-sbom-composer
compose -c ~/git/sbom-composer/config/example_config.yaml -d test-sbom-composer -s test-sbom-composer.spdx 
..generating composed SPDX document from directory: test-sbom-composer
...using config: /home/vargenau/git/sbom-composer/config/example_config.yaml
error while building spdx document reference for path test-sbom-composer with config top-level-artifact, &{https://spdx.org/spdxdocs/ Tool sbom-composer-1.0 [] map[]}: lstat test-sbom-composer: no such file or directory
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x88 pc=0x5c67db]

goroutine 1 [running]:
github.com/vmware-samples/sbom-composer/parser.Build({0x7ffdb2826764, 0x12}, 0xc0000ba000)
	/home/vargenau/go/pkg/mod/github.com/vmware-samples/sbom-composer/parser@v0.0.0-20220830173727-93b7e7dff554/build.go:18 +0x15b
github.com/vmware-samples/sbom-composer/parser.GenerateComposedDoc({0x7ffdb2826764, 0x12}, {0x7ffdb282677a, 0x17}, {0x61b9ad, 0x2}, {0x7ffdb2826725?, 0x0?})
	/home/vargenau/go/pkg/mod/github.com/vmware-samples/sbom-composer/parser@v0.0.0-20220830173727-93b7e7dff554/build.go:34 +0x73
main.runSBOMCompose(0x79c1a0?, {0x61bc54?, 0x6?, 0x6?})
	/home/vargenau/git/sbom-composer/cli/sbom_compose.go:60 +0x171
github.com/spf13/cobra.(*Command).execute(0x79c1a0, {0xc000012080, 0x6, 0x6})
	/home/vargenau/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:872 +0x694
github.com/spf13/cobra.(*Command).ExecuteC(0x79c1a0)
	/home/vargenau/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:990 +0x3b4
github.com/spf13/cobra.(*Command).Execute(...)
	/home/vargenau/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:918
main.main()
	/home/vargenau/git/sbom-composer/cli/sbom_compose.go:67 +0x25

AAA.spdx.txt
BBB.spdx.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant