Skip to content

Instantly share code, notes, and snippets.

Avatar

Tamir Duberstein tamird

View GitHub Profile
View gist:09b8c50c7c67c0eb4e17302bcc6eb7bd
fatal error: encountered OS exception
runtime stack:
runtime.throw({0x2f5147e458a, 0x18})
runtime/panic.go:1198 +0x54
runtime.sigpanic()
runtime/os_fuchsia.go:299 +0xa8
runtime.readgstatus(...)
runtime/proc.go:889
runtime.markroot(0x2b9e403d698, 0x90)
runtime/mgcmark.go:198 +0x188
View socket_test.cc
TEST(LocalhostTest, IpAddMembershipAny) {
fbl::unique_fd s;
ASSERT_TRUE(s = fbl::unique_fd(socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP))) << strerror(errno);
ip_mreqn param = {
.imr_address =
{
.s_addr = htonl(INADDR_ANY),
},
.imr_ifindex = 1,
View lowpan.patch
diff --git a/third_party/rust_crates/vendor/futures-util/src/stream/select.rs b/third_party/rust_crates/vendor/futures-util/src/stream/select.rs
index 133ac6c7ac0..58d71fe1df3 100644
--- a/third_party/rust_crates/vendor/futures-util/src/stream/select.rs
+++ b/third_party/rust_crates/vendor/futures-util/src/stream/select.rs
@@ -94,16 +94,16 @@ where
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<St1::Item>> {
let this = self.project();
- if !*this.flag {
- poll_inner(this.flag, this.stream1, this.stream2, cx)
View gist:21f66707dd4f1b1ac759c7858d2b27be
[44/57] ACTION //build/images:verify_capability_routes(//build/toolchain/fuchsia:x64)
FAILED: gen/build/images/verify_capability_routes.verified
../../build/gn_run_binary.sh ../../prebuilt/third_party/clang/linux-x64/bin host_x64/scrutiny_verify_routes --stamp gen/build/images/verify_capability_routes.verified --depfile obj/build/images/verify_capability_routes.d --allowlist ../../src/security/policy/build/verify_routes_exceptions_allowlist.json5
error: address range table at offset 0x73190 has a premature terminator entry at offset 0x731e0
error: address range table at offset 0xdc090 has a premature terminator entry at offset 0xdc100
error: address range table at offset 0xdc090 has a premature terminator entry at offset 0xdc120
error: address range table at offset 0xdc090 has a premature terminator entry at offset 0xdc140
error: address range table at offset 0xf9440 has a premature terminator entry at offset 0xf9460
error: address range table at offset 0xf9440 has a premature terminator entry at offset 0xf9
View foo.rs
pub(crate) trait Transport<I: Ip> {
type SocketCollection;
}
pub(crate) enum Udp {}
impl<I: Ip> Transport<I> for Udp {
type SocketCollection = UdpSocketCollection<I>;
}
View gist:56aff923e2b061546dc59bc7fec855cf
third_party/golibs/vendor/github.com/census-instrumentation/opencensus-proto/AUTHORS | 1 +
third_party/golibs/vendor/github.com/census-instrumentation/opencensus-proto/LICENSE | 202 ++
third_party/golibs/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1/resource.pb.go | 194 ++
third_party/golibs/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace.pb.go | 2240 +++++++++++++++
third_party/golibs/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace_config.pb.go | 560 ++++
third_party/golibs/vendor/github.com/cespare/xxhash/v2/LICENSE.txt | 22 +
third_party/golibs/vendor/github.com/cespare/xxhash/v2/README.md | 69
View git grep -E ' as [ui](size|[0-9]{1,2})' -- '*.rs'
src/ext.rs: assert_eq!(len as usize, mem::size_of::<T>());
src/ext.rs: Ok(Some((secs as u32) * 1000))
src/ext.rs: Ok(Some((secs as u32) * 1000))
src/ext.rs: .map(|b| b as u32)
src/ext.rs: Some(dur.tv_sec as u32 * 1000 + dur.tv_usec as u32 / 1000)
src/ext.rs: Some(Duration::from_secs(linger_opt.l_linger as u64))
src/ext.rs: l_linger: d.as_secs() as u16,
src/ext.rs: Duration::new((ms as u64) / 1000, (ms as u32) % 1000 * 1_000_000)
src/ext.rs: (dur.as_secs() as u32 * 1000) + (dur.subsec_nanos() / 1_000_000)
src/ext.rs: n as usize
View dart.diff
diff --git a/build/dart/sdk/detect_api_changes/lib/analyze.dart b/build/dart/sdk/detect_api_changes/lib/analyze.dart
index bda2e37c2e..fc95b2f9bf 100644
--- a/build/dart/sdk/detect_api_changes/lib/analyze.dart
+++ b/build/dart/sdk/detect_api_changes/lib/analyze.dart
@@ -40,7 +40,9 @@ Future<String> analyzeAPI(String apiName, List<String> sources) async {
AnalysisSession session = context.currentSession;
var result = await session.getResolvedUnit(path);
- result.unit.accept(d);
+ if (result.unit != null) {
View gist:407f8681097ddb916845895ae70ac975
ERROR at //third_party/dart/build/dart/copy_tree.gni:83:28: Script returned non-zero exit code.
copy_tree_inputs_scope = exec_script("$_dart_root/tools/copy_tree.py",
^----------
Current dir: /usr/local/google/home/tamird/src/fuchsia/out/default/
Command: /usr/bin/env /usr/local/google/home/tamird/src/fuchsia/third_party/dart/tools/copy_tree.py --gn /usr/local/google/home/tamird/src/fuchsia/third_party/dart/third_party/pkg/dartdoc/lib/templates {} /usr/local/google/home/tamird/src/fuchsia/third_party/dart/third_party/pkg/dartdoc/lib/resources {} /usr/local/google/home/tamird/src/fuchsia/third_party/dart/sdk/lib/_chrome *.svn,doc,*.py,*.gypi,*.sh,.gitignore /usr/local/google/home/tamird/src/fuchsia/third_party/dart/sdk/lib/_internal *.svn,doc,*.py,*.gypi,*.sh,.gitignore /usr/local/google/home/tamird/src/fuchsia/third_party/dart/sdk/lib/async *.svn,doc,*.py,*.gypi,*.sh,.gitignore /usr/local/google/home/tamird/src/fuchsia/third_party/dart/sdk/lib/cli *.svn,doc,*.py,*.gypi,*.sh,.gitig
View main.dart
void main() {
var addresses = [
"fe80::8eae:4cff:fee9:8434%br0",
"[fe80::8eae:4cff:fee9:8434%br0]",
"[fe80::8eae:4cff:fee9:8434%br0]:22",
];
for (var address in addresses) {
print(address);
try {
print(Uri.http(address, '/'));