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

fix empty parameters list issue #821

Merged
merged 4 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

**Fixes**

- Fix empty parameters list issue ([#821](https://github.com/getsentry/symbolic/pull/821))

## 12.6.0

### Various fixes & improvements
Expand Down
42 changes: 21 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions py/symbolic/proguard.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from __future__ import annotations
from typing import Tuple
from typing import Optional, Tuple

import uuid as uuid_mod

Expand Down Expand Up @@ -81,15 +81,20 @@ def remap_method(self, klass: str, method: str) -> Tuple[str, str] | None:
return output if len(output[0]) > 0 and len(output[1]) > 0 else None

def remap_frame(
self, klass: str, method: str, line: int, parameters: str = ""
self,
klass: str,
method: str,
line: int,
parameters: Optional[str] = None,
) -> list[JavaStackFrame]:
"""Remaps the stackframe, given its class, method and line."""
result = self._methodcall(
lib.symbolic_proguardmapper_remap_frame,
encode_str(klass),
encode_str(method),
line,
encode_str(parameters),
encode_str("" if parameters is None else parameters),
parameters is not None,
)

frames = []
Expand Down
3 changes: 2 additions & 1 deletion symbolic-cabi/include/symbolic.h
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@ struct SymbolicProguardRemapResult symbolic_proguardmapper_remap_frame(const str
const struct SymbolicStr *class_,
const struct SymbolicStr *method,
uintptr_t line,
const struct SymbolicStr *parameters);
const struct SymbolicStr *parameters,
bool use_parameters);

/**
* Remaps a class name.
Expand Down
3 changes: 2 additions & 1 deletion symbolic-cabi/src/proguard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ ffi_fn! {
method: *const SymbolicStr,
line: usize,
parameters: *const SymbolicStr,
use_parameters: bool,
) -> Result<SymbolicProguardRemapResult> {
let mapper = &SymbolicProguardMapper::as_rust(mapper).inner.get().mapper;
let frame = if (*parameters).len > 0 {
let frame = if use_parameters {
StackFrame::with_parameters((*class).as_str(), (*method).as_str(), (*parameters).as_str())
} else {
StackFrame::new((*class).as_str(), (*method).as_str(), line)
Expand Down
Loading