You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "exgalibas (via GitHub)" <gi...@apache.org> on 2024/10/10 03:24:35 UTC
[PR] Null Pointer Exception Potential [skywalking-go]
exgalibas opened a new pull request, #207:
URL: https://github.com/apache/skywalking-go/pull/207
(no comment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Null Pointer Exception Potential [skywalking-go]
Posted by "mrproliu (via GitHub)" <gi...@apache.org>.
mrproliu commented on PR #207:
URL: https://github.com/apache/skywalking-go/pull/207#issuecomment-2404128057
Also, please fix the conflict.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Null Pointer Exception Potential [skywalking-go]
Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on PR #207:
URL: https://github.com/apache/skywalking-go/pull/207#issuecomment-2403864485
Why we have npe here? What is the case?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Null Pointer Exception Potential [skywalking-go]
Posted by "mrproliu (via GitHub)" <gi...@apache.org>.
mrproliu commented on PR #207:
URL: https://github.com/apache/skywalking-go/pull/207#issuecomment-2404123583
Then, can we use the `reflect.ValueOf().IsNil()` to judgment the reference is nil or not? The `reflect` is the more lower level case, we can use the standard way to do this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Null Pointer Exception Potential [skywalking-go]
Posted by "mrproliu (via GitHub)" <gi...@apache.org>.
mrproliu commented on PR #207:
URL: https://github.com/apache/skywalking-go/pull/207#issuecomment-2403929388
Please add more scenario description here, why we need this kind of check?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Null Pointer Exception Potential [skywalking-go]
Posted by "exgalibas (via GitHub)" <gi...@apache.org>.
exgalibas commented on PR #207:
URL: https://github.com/apache/skywalking-go/pull/207#issuecomment-2404105415
> Please add more scenario description here, why we need this kind of check?
because Entity is interface, go interface contains type and data, when type is not nil, the interface will not be nil, but the data can be nil, show some code example:
type Entity interface {
Do()
}
type ImpEntity struct {
Name string
}
func (e *ImpEntity) Do() {
fmt.Println(e.Name)
}
func main() {
var i *ImpEntity
fmt.Println(i == nil) // true
Test(i)
}
func Test(e Entity) {
if e != nil { // not nil
e.Do() // panic
}
}
so when tracer.ServiceEntity is nil, will panic
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Null Pointer Exception Potential [skywalking-go]
Posted by "exgalibas (via GitHub)" <gi...@apache.org>.
exgalibas closed pull request #207: Null Pointer Exception Potential
URL: https://github.com/apache/skywalking-go/pull/207
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org